Skip to content

Commit

Permalink
update tests
Browse files Browse the repository at this point in the history
update tests
  • Loading branch information
DJensen94 committed Oct 1, 2024
1 parent a8c6b2d commit 7162708
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 1 deletion.
9 changes: 9 additions & 0 deletions backend/src/tasks/test/search-sync.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ describe('search_sync', () => {
const domain = await Domain.create({
name: 'cisa.gov',
organization,
isFceb: true,
syncedAt: new Date('9999-10-10')
}).save();

Expand All @@ -59,6 +60,7 @@ describe('search_sync', () => {
const domain = await Domain.create({
name: 'cisa.gov',
organization,
isFceb: true,
syncedAt: new Date('9999-10-10')
}).save();

Expand All @@ -84,6 +86,7 @@ describe('search_sync', () => {
const domain = await Domain.create({
name: 'cisa.gov',
organization,
isFceb: true,
syncedAt: new Date('9999-10-10')
}).save();

Expand All @@ -109,6 +112,7 @@ describe('search_sync', () => {
const domain = await Domain.create({
name: 'cisa.gov',
organization,
isFceb: true,
syncedAt: new Date('9999-10-10')
}).save();

Expand All @@ -133,6 +137,7 @@ describe('search_sync', () => {
const domain = await Domain.create({
name: 'cisa.gov',
organization,
isFceb: true,
syncedAt: new Date('9999-10-10')
}).save();

Expand Down Expand Up @@ -165,6 +170,7 @@ describe('search_sync', () => {
const domain = await Domain.create({
name: 'cisa.gov',
organization,
isFceb: true,
syncedAt: new Date('9999-10-10')
}).save();

Expand All @@ -191,6 +197,7 @@ describe('search_sync', () => {
const domain = await Domain.create({
name: 'cisa.gov',
organization,
isFceb: true,
syncedAt: new Date('9999-10-10')
}).save();

Expand All @@ -209,6 +216,7 @@ describe('search_sync', () => {
const domain = await Domain.create({
name: 'cisa.gov',
organization,
isFceb: true,
syncedAt: new Date('9999-09-19T19:57:32.346Z'),
updatedAt: new Date('9999-09-20T19:57:32.346Z')
}).save();
Expand Down Expand Up @@ -257,6 +265,7 @@ describe('search_sync', () => {
Domain.create({
name: 'cisa-' + Math.random() + '.gov',
organization,
isFceb: true,
syncedAt: new Date('9999-09-19T19:57:32.346Z'),
updatedAt: new Date('9999-09-20T19:57:32.346Z')
}).save()
Expand Down
4 changes: 3 additions & 1 deletion backend/src/tasks/test/shodan.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,9 @@ describe('shodan', () => {
updatedAt: null,
createdAt: null,
syncedAt: null,
name: null
name: null,
isFceb: null,
fromCidr: null
}))
).toMatchSnapshot();
expect(domains.filter((e) => !e.organization).length).toEqual(0);
Expand Down
2 changes: 2 additions & 0 deletions backend/test/vulnerabilities.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ describe('vulnerabilities', () => {
}).save();
const domain = await Domain.create({
name: 'test-' + Math.random(),
isFceb: true,
organization
}).save();
const vulnerability = await Vulnerability.create({
Expand All @@ -45,6 +46,7 @@ describe('vulnerabilities', () => {
}).save();
const domain2 = await Domain.create({
name: 'test-' + Math.random(),
isFceb: true,
organization: organization2
}).save();
const vulnerability2 = await Vulnerability.create({
Expand Down

0 comments on commit 7162708

Please sign in to comment.