Skip to content

Commit

Permalink
unit tests for the code
Browse files Browse the repository at this point in the history
  • Loading branch information
adpare committed Feb 7, 2024
1 parent e8b57ee commit fbe7cb2
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 2 deletions.
2 changes: 1 addition & 1 deletion nav-app/src/app/tabs/tabs.component.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -310,7 +310,7 @@ describe('TabsComponent', () => {
});

it('should read and open json file', waitForAsync(() => {
component.dataService.setUpURLs(MockData.configData);
component.dataService.setUpURLs(MockData.mobileDomainData);
let mockedDocElement = document.createElement('input');
mockedDocElement.id = 'uploader';
mockedDocElement.value = 'test1';
Expand Down
16 changes: 15 additions & 1 deletion nav-app/src/tests/utils/mock-data.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,20 @@ export const configData = [
],
},
];

export const mobileDomainData = [
{
name: 'ATT&CK v13',
version: '13',
domains: [
{
name: 'Mobile',
identifier: 'mobile-attack',
data: ['https://raw.githubusercontent.com/mitre/cti/ATT%26CK-v14.1/mobile-attack/mobile-attack.json'],
},
],
},
];
export const configDataExtended = [
{
name: 'ATT&CK v13',
Expand Down Expand Up @@ -250,7 +264,7 @@ export const matrixSDO = {
id: 'matrix-0',
type: 'x-mitre-matrix',
tactic_refs: ['tactic-0'],
external_references: [{ external_id: 'enterprise-matrix' }],
external_references: [{ external_id: 'enterprise-attack' }],
};
export const deprecatedMatrixSDO = {
...stixSDO,
Expand Down

0 comments on commit fbe7cb2

Please sign in to comment.