From cc9331ab1d4f8b30d5ca5d737e3446162a880b4b Mon Sep 17 00:00:00 2001 From: Ron Tal Date: Tue, 16 Mar 2021 15:19:57 +0200 Subject: [PATCH 1/3] fix: jest skipping iac unit-tests + fixed failing tests --- .circleci/config.yml | 10 ++- jest.config.js | 1 + package.json | 1 + .../test/iac-local-execution/file-loader.ts | 10 +-- .../test/iac-local-execution/file-scanner.ts | 10 ++- .../test/iac-local-execution/file-utils.ts | 1 + test/iac-unit-tests/file-utils.spec.ts | 31 --------- test/iac-unit-tests/index.spec.ts | 64 ------------------ .../iac-unit-tests/file-loader.fixtures.ts | 8 +-- .../unit}/iac-unit-tests/file-loader.spec.ts | 4 +- .../iac-unit-tests/file-parser.fixtures.ts | 2 +- .../unit}/iac-unit-tests/file-parser.spec.ts | 2 +- .../iac-unit-tests/file-scanner.fixtures.ts | 4 +- .../unit}/iac-unit-tests/file-scanner.spec.ts | 26 ++++--- .../unit/iac-unit-tests/file-utils.spec.ts | 35 ++++++++++ test/jest/unit/iac-unit-tests/index.spec.ts | 67 +++++++++++++++++++ .../unit}/iac-unit-tests/local-cache.spec.ts | 16 +++-- 17 files changed, 163 insertions(+), 129 deletions(-) delete mode 100644 test/iac-unit-tests/file-utils.spec.ts delete mode 100644 test/iac-unit-tests/index.spec.ts rename test/{ => jest/unit}/iac-unit-tests/file-loader.fixtures.ts (75%) rename test/{ => jest/unit}/iac-unit-tests/file-loader.spec.ts (95%) rename test/{ => jest/unit}/iac-unit-tests/file-parser.fixtures.ts (97%) rename test/{ => jest/unit}/iac-unit-tests/file-parser.spec.ts (93%) rename test/{ => jest/unit}/iac-unit-tests/file-scanner.fixtures.ts (96%) rename test/{ => jest/unit}/iac-unit-tests/file-scanner.spec.ts (66%) create mode 100644 test/jest/unit/iac-unit-tests/file-utils.spec.ts create mode 100644 test/jest/unit/iac-unit-tests/index.spec.ts rename test/{ => jest/unit}/iac-unit-tests/local-cache.spec.ts (78%) diff --git a/.circleci/config.yml b/.circleci/config.yml index 61cebc4d77..23fb3a12a7 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -269,8 +269,11 @@ jobs: condition: << parameters.jest_tests >> steps: - run: - name: Run Jest tests + name: Run Jest tests in root (to remove) command: npm run test:jest + - run: + name: Run Jest Unit Tests + command: npm run test:jest-unit - when: condition: << parameters.acceptance_tests >> steps: @@ -335,8 +338,11 @@ jobs: condition: << parameters.jest_tests >> steps: - run: - name: Run Jest tests + name: Run Jest tests in root (to remove) command: npm run test:jest + - run: + name: Run Jest Unit Tests + command: npm run test:jest-unit - when: condition: << parameters.acceptance_tests >> steps: diff --git a/jest.config.js b/jest.config.js index 247e622672..e28b5538da 100644 --- a/jest.config.js +++ b/jest.config.js @@ -9,6 +9,7 @@ module.exports = { '/test/*.spec.ts', '/test/iac-unit-tests/*.spec.ts', '/packages/**/test/**/*.spec.ts', + '/test/jest/unit/**/*.spec.ts', ], modulePathIgnorePatterns: [ '/test/.*fixtures', diff --git a/package.json b/package.json index 13ca154618..9af285ff6e 100644 --- a/package.json +++ b/package.json @@ -40,6 +40,7 @@ "test:acceptance-windows": "tap test/acceptance/**/*.test.* -Rspec --timeout=300 --node-arg=-r --node-arg=ts-node/register", "test:system": "tap test/system/*.test.* -Rspec --timeout=300 --node-arg=-r --node-arg=ts-node/register", "test:jest": "jest --runInBand \"\/test\/[^/]+\\.spec\\.ts\"", + "test:jest-unit": "jest --runInBand \"\/test\/jest\/unit\/((.+)\/)*[^/]+\\.spec\\.ts\"", "test:packages-unit": "jest \"\/packages\/(.+)\/test\/unit\/((.+)\/)*[^/]+\\.spec\\.ts\"", "test:packages-acceptance": "jest \"\/packages\/(.+)\/test\/acceptance\/((.+)\/)*[^/]+\\.spec\\.ts\"", "test:test": "tap test/*.test.* -Rspec --timeout=300 --node-arg=-r --node-arg=ts-node/register", diff --git a/src/cli/commands/test/iac-local-execution/file-loader.ts b/src/cli/commands/test/iac-local-execution/file-loader.ts index 44e1df3cd8..e16e3bc422 100644 --- a/src/cli/commands/test/iac-local-execution/file-loader.ts +++ b/src/cli/commands/test/iac-local-execution/file-loader.ts @@ -1,12 +1,10 @@ import { makeDirectoryIterator } from '../../../../lib/iac/makeDirectoryIterator'; -import * as fs from 'fs'; -import * as util from 'util'; +import { promises as fs } from 'fs'; import { IacFileData, VALID_FILE_TYPES } from './types'; import { getFileType } from '../../../../lib/iac/iac-parser'; import { IacFileTypes } from '../../../../lib/iac/constants'; import { isLocalFolder } from '../../../../lib/detect'; -const loadFileContents = util.promisify(fs.readFile); const DEFAULT_ENCODING = 'utf-8'; export async function loadFiles(pathToScan: string): Promise { @@ -47,9 +45,13 @@ async function tryLoadFileData( return null; } + const fileContent = ( + await fs.readFile(pathToScan, DEFAULT_ENCODING) + ).toString(); + return { filePath: pathToScan, fileType: fileType as IacFileTypes, - fileContent: await loadFileContents(pathToScan, DEFAULT_ENCODING), + fileContent, }; } diff --git a/src/cli/commands/test/iac-local-execution/file-scanner.ts b/src/cli/commands/test/iac-local-execution/file-scanner.ts index e2d2f69516..af4130b22e 100644 --- a/src/cli/commands/test/iac-local-execution/file-scanner.ts +++ b/src/cli/commands/test/iac-local-execution/file-scanner.ts @@ -32,7 +32,15 @@ async function getPolicyEngine(engineType: EngineType): Promise { return policyEngineCache[engineType]!; } -const policyEngineCache: { [key in EngineType]: PolicyEngine | null } = { +// used in tests only +export function clearPolicyEngineCache() { + policyEngineCache = { + [EngineType.Kubernetes]: null, + [EngineType.Terraform]: null, + }; +} + +let policyEngineCache: { [key in EngineType]: PolicyEngine | null } = { [EngineType.Kubernetes]: null, [EngineType.Terraform]: null, }; diff --git a/src/cli/commands/test/iac-local-execution/file-utils.ts b/src/cli/commands/test/iac-local-execution/file-utils.ts index 78c0c8627f..4f1b897fe0 100644 --- a/src/cli/commands/test/iac-local-execution/file-utils.ts +++ b/src/cli/commands/test/iac-local-execution/file-utils.ts @@ -21,6 +21,7 @@ export function createIacDir(): void { export function extractBundle(response): Promise { return new Promise((resolve, reject) => { response + .on('error', reject) .pipe( tar.x({ C: path.join('.iac-data'), diff --git a/test/iac-unit-tests/file-utils.spec.ts b/test/iac-unit-tests/file-utils.spec.ts deleted file mode 100644 index c507035d34..0000000000 --- a/test/iac-unit-tests/file-utils.spec.ts +++ /dev/null @@ -1,31 +0,0 @@ -import { extractBundle } from '../../src/cli/commands/test/iac-local-execution/file-utils'; - -describe('extractBundle', () => { - const { PassThrough } = require('stream'); - jest.mock('fs'); - - it('fails to write the file on disk', () => { - const mockReadable = new PassThrough(); - const mockError = new Error('A stream error'); - - const actualPromise = extractBundle(mockReadable); - setTimeout(() => { - mockReadable.emit('error', mockError); - }, 100); - - expect(actualPromise).rejects.toThrow(mockError); - }); - - it('resolves data successfully', () => { - const mockReadable = new PassThrough(); - - const actualPromise = extractBundle(mockReadable); - - setTimeout(() => { - mockReadable.emit('data', 'this-is-a-file-chunk'); - mockReadable.emit('end'); - }, 100); - - expect(actualPromise).resolves.toEqual(undefined); - }); -}); diff --git a/test/iac-unit-tests/index.spec.ts b/test/iac-unit-tests/index.spec.ts deleted file mode 100644 index 95bcbc18bf..0000000000 --- a/test/iac-unit-tests/index.spec.ts +++ /dev/null @@ -1,64 +0,0 @@ -jest.mock('../../src/cli/commands/test/iac-local-execution/local-cache'); -jest.mock('../../src/cli/commands/test/iac-local-execution/file-loader'); -jest.mock('../../src/cli/commands/test/iac-local-execution/file-parser', () => { - const { IacProjectType } = require('../../src/lib/iac/constants'); - const { - EngineType, - } = require('../../src/cli/commands/test/iac-local-execution/types'); - const parsedFiles: IacFileParsed[] = [ - { - engineType: EngineType.Terraform, - fileContent: 'FAKE_FILE_CONTENT', - jsonContent: {}, - filePath: './storage/storage.tf', - fileType: 'tf', - failureReason: 'Mock Test', - projectType: IacProjectType.TERRAFORM, - }, - ]; - return { - parseFiles: async () => ({ parsedFiles, failedFiles: [] }), - }; -}); -jest.mock( - '../../src/cli/commands/test/iac-local-execution/file-scanner', - () => { - return { - scanFiles: async () => [], - }; - }, -); -jest.mock('../../src/lib/detect', () => ({ - isLocalFolder: () => true, -})); - -import { test } from '../../src/cli/commands/test/iac-local-execution'; -import { - IacFileParsed, - IacOptionFlags, -} from '../../src/cli/commands/test/iac-local-execution/types'; -import { IacProjectType } from '../../src/lib/iac/constants'; - -describe('test()', () => { - it('extends the options object with iacDirFiles when a local directory is provided', async () => { - const opts: IacOptionFlags = {}; - await test('./storage/', opts); - - expect(opts.iacDirFiles).toEqual([ - { - filePath: './storage/storage.tf', - fileType: 'tf', - failureReason: 'Mock Test', - projectType: IacProjectType.TERRAFORM, - }, - ]); - expect(opts.iacDirFiles).not.toEqual( - expect.arrayContaining([ - { - fileContent: 'FAKE_FILE_CONTENT', - jsonContent: {}, - }, - ]), - ); - }); -}); diff --git a/test/iac-unit-tests/file-loader.fixtures.ts b/test/jest/unit/iac-unit-tests/file-loader.fixtures.ts similarity index 75% rename from test/iac-unit-tests/file-loader.fixtures.ts rename to test/jest/unit/iac-unit-tests/file-loader.fixtures.ts index a369b29865..74539b40e0 100644 --- a/test/iac-unit-tests/file-loader.fixtures.ts +++ b/test/jest/unit/iac-unit-tests/file-loader.fixtures.ts @@ -1,10 +1,10 @@ import * as path from 'path'; const fileContent = 'dont-care'; -const mixedDirectory = path.join(__dirname, '/mixed'); +const mixedDirectory = path.join(__dirname, 'mixed'); -export const k8sDirectory = path.join(__dirname, '/kubernetes/files'); -export const emptyDirectory = path.join(__dirname, '/empty-dir'); +export const k8sDirectory = path.join(__dirname, 'kubernetes', 'files'); +export const emptyDirectory = path.join(__dirname, 'empty-dir'); export const k8sFileStub = { fileContent, filePath: path.join(k8sDirectory, 'k8s.yaml'), @@ -16,7 +16,7 @@ export const anotherK8sFileStub = { filePath: path.join(k8sDirectory, 'pod.yaml'), }; -export const terraformDirectory = path.join(__dirname, '/terraform/files'); +export const terraformDirectory = path.join(__dirname, 'terraform', 'files'); export const terraformFileStub = { fileContent, diff --git a/test/iac-unit-tests/file-loader.spec.ts b/test/jest/unit/iac-unit-tests/file-loader.spec.ts similarity index 95% rename from test/iac-unit-tests/file-loader.spec.ts rename to test/jest/unit/iac-unit-tests/file-loader.spec.ts index b4e257b72c..1f16a13402 100644 --- a/test/iac-unit-tests/file-loader.spec.ts +++ b/test/jest/unit/iac-unit-tests/file-loader.spec.ts @@ -1,5 +1,5 @@ const mockFs = require('mock-fs'); -import { loadFiles } from '../../src/cli/commands/test/iac-local-execution/file-loader'; +import { loadFiles } from '../../../../src/cli/commands/test/iac-local-execution/file-loader'; import { k8sFileStub, anotherK8sFileStub, @@ -95,7 +95,7 @@ describe('loadFiles', () => { anotherTerraformFileStub.fileContent, }); - const loadedFiles = await loadFiles('./'); + const loadedFiles = await loadFiles('.'); expect(loadedFiles).toEqual([ k8sFileStub, anotherK8sFileStub, diff --git a/test/iac-unit-tests/file-parser.fixtures.ts b/test/jest/unit/iac-unit-tests/file-parser.fixtures.ts similarity index 97% rename from test/iac-unit-tests/file-parser.fixtures.ts rename to test/jest/unit/iac-unit-tests/file-parser.fixtures.ts index 883f1a6782..e836370edb 100644 --- a/test/iac-unit-tests/file-parser.fixtures.ts +++ b/test/jest/unit/iac-unit-tests/file-parser.fixtures.ts @@ -2,7 +2,7 @@ import { EngineType, IacFileData, IacFileParsed, -} from '../../src/cli/commands/test/iac-local-execution/types'; +} from '../../../../src/cli/commands/test/iac-local-execution/types'; const kubernetesFileContent = ` apiVersion: v1 diff --git a/test/iac-unit-tests/file-parser.spec.ts b/test/jest/unit/iac-unit-tests/file-parser.spec.ts similarity index 93% rename from test/iac-unit-tests/file-parser.spec.ts rename to test/jest/unit/iac-unit-tests/file-parser.spec.ts index 30c2f25fd3..769258be6e 100644 --- a/test/iac-unit-tests/file-parser.spec.ts +++ b/test/jest/unit/iac-unit-tests/file-parser.spec.ts @@ -1,4 +1,4 @@ -import { parseFiles } from '../../src/cli/commands/test/iac-local-execution/file-parser'; +import { parseFiles } from '../../../../src/cli/commands/test/iac-local-execution/file-parser'; import { expectedKubernetesParsingResult, expectedTerraformParsingResult, diff --git a/test/iac-unit-tests/file-scanner.fixtures.ts b/test/jest/unit/iac-unit-tests/file-scanner.fixtures.ts similarity index 96% rename from test/iac-unit-tests/file-scanner.fixtures.ts rename to test/jest/unit/iac-unit-tests/file-scanner.fixtures.ts index 7e7d2ead6d..ff21a9bd5c 100644 --- a/test/iac-unit-tests/file-scanner.fixtures.ts +++ b/test/jest/unit/iac-unit-tests/file-scanner.fixtures.ts @@ -2,8 +2,8 @@ import { EngineType, IacFileParsed, PolicyMetadata, -} from '../../src/cli/commands/test/iac-local-execution/types'; -import { SEVERITY } from '../../src/lib/snyk-test/common'; +} from '../../../../src/cli/commands/test/iac-local-execution/types'; +import { SEVERITY } from '../../../../src/lib/snyk-test/common'; export const expectedViolatedPoliciesForK8s: Array = [ { diff --git a/test/iac-unit-tests/file-scanner.spec.ts b/test/jest/unit/iac-unit-tests/file-scanner.spec.ts similarity index 66% rename from test/iac-unit-tests/file-scanner.spec.ts rename to test/jest/unit/iac-unit-tests/file-scanner.spec.ts index 4d9b0f35e3..0e6eb5ba42 100644 --- a/test/iac-unit-tests/file-scanner.spec.ts +++ b/test/jest/unit/iac-unit-tests/file-scanner.spec.ts @@ -1,7 +1,10 @@ const mockFs = require('mock-fs'); import * as path from 'path'; -import { scanFiles } from '../../src/cli/commands/test/iac-local-execution/file-scanner'; -import { IacFileParsed } from '../../src/cli/commands/test/iac-local-execution/types'; +import { + scanFiles, + clearPolicyEngineCache, +} from '../../../../src/cli/commands/test/iac-local-execution/file-scanner'; +import { IacFileParsed } from '../../../../src/cli/commands/test/iac-local-execution/types'; import { paresdKubernetesFileStub, @@ -16,18 +19,19 @@ describe('scanFiles', () => { parsedTerraformFileStub, ]; - beforeAll(() => { - mockFs({ - [path.resolve(__dirname, '../../.iac-data')]: mockFs.load( - path.resolve(__dirname, '../smoke/.iac-data'), - ), - }); + afterEach(() => { + mockFs.restore(); + clearPolicyEngineCache(); }); - afterAll(mockFs.restore); - describe('with parsed files', () => { it('returns the expected viloated policies', async () => { + mockFs({ + [path.resolve(__dirname, '../../../../.iac-data')]: mockFs.load( + path.resolve(__dirname, '../../../smoke/.iac-data'), + ), + }); + const scanResults = await scanFiles(parsedFiles); expect(scanResults[0].violatedPolicies).toEqual( expectedViolatedPoliciesForK8s, @@ -43,7 +47,7 @@ describe('scanFiles', () => { describe('missing policy engine wasm files', () => { it('throws an error', async () => { mockFs({ - [path.resolve(__dirname, '../../.iac-data')]: {}, + [path.resolve(__dirname, '../../../../.iac-data')]: {}, }); await expect(scanFiles(parsedFiles)).rejects.toThrow(); diff --git a/test/jest/unit/iac-unit-tests/file-utils.spec.ts b/test/jest/unit/iac-unit-tests/file-utils.spec.ts new file mode 100644 index 0000000000..ab0541bd14 --- /dev/null +++ b/test/jest/unit/iac-unit-tests/file-utils.spec.ts @@ -0,0 +1,35 @@ +import { extractBundle } from '../../../../src/cli/commands/test/iac-local-execution/file-utils'; +import * as tar from 'tar'; +import { PassThrough } from 'stream'; + +describe('extractBundle', () => { + jest.mock('fs'); + + it('fails to write the file on disk', async () => { + const mockReadable = new PassThrough(); + const mockError = new Error('A stream error'); + + const actualPromise = extractBundle(mockReadable); + mockReadable.emit('error', mockError); + + await expect(actualPromise).rejects.toThrow(mockError); + }); + + it('resolves data successfully', async () => { + const tarSpy = jest.spyOn(tar, 'x'); + + let receivedBundleData = ''; + const mockUntarStream = new PassThrough(); + mockUntarStream.on('data', (evt) => (receivedBundleData += evt.toString())); + tarSpy.mockReturnValueOnce(mockUntarStream); + + const mockBundleStream = new PassThrough(); + const extractBundlePromise = extractBundle(mockBundleStream); + mockBundleStream.write('zipped data'); + mockBundleStream.end(); + + await expect(extractBundlePromise).resolves.toEqual(undefined); + expect(tarSpy).toBeCalledWith({ C: expect.stringMatching('.iac-data') }); + expect(receivedBundleData).toEqual('zipped data'); + }); +}); diff --git a/test/jest/unit/iac-unit-tests/index.spec.ts b/test/jest/unit/iac-unit-tests/index.spec.ts new file mode 100644 index 0000000000..261890b2a4 --- /dev/null +++ b/test/jest/unit/iac-unit-tests/index.spec.ts @@ -0,0 +1,67 @@ +jest.mock('../../../../src/cli/commands/test/iac-local-execution/local-cache'); +jest.mock('../../../../src/cli/commands/test/iac-local-execution/file-loader'); +jest.mock( + '../../../../src/cli/commands/test/iac-local-execution/file-parser', + () => { + const { IacProjectType } = require('../../../../src/lib/iac/constants'); + const { + EngineType, + } = require('../../../../src/cli/commands/test/iac-local-execution/types'); + const parsedFiles: IacFileParsed[] = [ + { + engineType: EngineType.Terraform, + fileContent: 'FAKE_FILE_CONTENT', + jsonContent: {}, + filePath: './storage/storage.tf', + fileType: 'tf', + failureReason: 'Mock Test', + projectType: IacProjectType.TERRAFORM, + }, + ]; + return { + parseFiles: async () => ({ parsedFiles, failedFiles: [] }), + }; + }, +); +jest.mock( + '../../../../src/cli/commands/test/iac-local-execution/file-scanner', + () => { + return { + scanFiles: async () => [], + }; + }, +); +jest.mock('../../../../src/lib/detect', () => ({ + isLocalFolder: () => true, +})); + +import { test } from '../../../../src/cli/commands/test/iac-local-execution'; +import { + IacFileParsed, + IacOptionFlags, +} from '../../../../src/cli/commands/test/iac-local-execution/types'; +import { IacProjectType } from '../../../../src/lib/iac/constants'; + +describe('test()', () => { + it('extends the options object with iacDirFiles when a local directory is provided', async () => { + const opts: IacOptionFlags = {}; + await test('./storage/', opts); + + expect(opts.iacDirFiles).toEqual([ + { + filePath: './storage/storage.tf', + fileType: 'tf', + failureReason: 'Mock Test', + projectType: IacProjectType.TERRAFORM, + }, + ]); + expect(opts.iacDirFiles).not.toEqual( + expect.arrayContaining([ + { + fileContent: 'FAKE_FILE_CONTENT', + jsonContent: {}, + }, + ]), + ); + }); +}); diff --git a/test/iac-unit-tests/local-cache.spec.ts b/test/jest/unit/iac-unit-tests/local-cache.spec.ts similarity index 78% rename from test/iac-unit-tests/local-cache.spec.ts rename to test/jest/unit/iac-unit-tests/local-cache.spec.ts index d192ea6f3f..b7564a062b 100644 --- a/test/iac-unit-tests/local-cache.spec.ts +++ b/test/jest/unit/iac-unit-tests/local-cache.spec.ts @@ -1,19 +1,19 @@ -import * as localCacheModule from '../../src/cli/commands/test/iac-local-execution/local-cache'; -import { REQUIRED_LOCAL_CACHE_FILES } from '../../src/cli/commands/test/iac-local-execution/local-cache'; -import * as fileUtilsModule from '../../src/cli/commands/test/iac-local-execution/file-utils'; +import * as localCacheModule from '../../../../src/cli/commands/test/iac-local-execution/local-cache'; +import { REQUIRED_LOCAL_CACHE_FILES } from '../../../../src/cli/commands/test/iac-local-execution/local-cache'; +import * as fileUtilsModule from '../../../../src/cli/commands/test/iac-local-execution/file-utils'; import { PassThrough } from 'stream'; import * as needle from 'needle'; describe('initLocalCache - SNYK_IAC_SKIP_BUNDLE_DOWNLOAD is not set', () => { beforeEach(() => { - jest.resetModules(); + jest.resetAllMocks(); + delete process.env.SNYK_IAC_SKIP_BUNDLE_DOWNLOAD; }); const fs = require('fs'); fs.existsSync = jest.fn().mockReturnValue(true); it('downloads and extracts the bundle successfully', () => { - delete process.env.SNYK_IAC_SKIP_BUNDLE_DOWNLOAD; const mockReadable = new PassThrough(); const spy = jest.spyOn(fileUtilsModule, 'extractBundle'); jest.spyOn(fileUtilsModule, 'createIacDir').mockImplementation(() => null); @@ -26,7 +26,11 @@ describe('initLocalCache - SNYK_IAC_SKIP_BUNDLE_DOWNLOAD is not set', () => { }); describe('initLocalCache - SNYK_IAC_SKIP_BUNDLE_DOWNLOAD is true', () => { - process.env.SNYK_IAC_SKIP_BUNDLE_DOWNLOAD = 'true'; + beforeEach(() => { + jest.resetAllMocks(); + process.env.SNYK_IAC_SKIP_BUNDLE_DOWNLOAD = 'true'; + }); + const fs = require('fs'); it('skips the download of the bundle', async () => { From 453db4c33571b37076d198875ef928e9e6ff7336 Mon Sep 17 00:00:00 2001 From: Ron Tal Date: Wed, 17 Mar 2021 14:45:50 +0200 Subject: [PATCH 2/3] fix: temporarly skip flaky test --- test/cli-json-file-output.spec.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/cli-json-file-output.spec.ts b/test/cli-json-file-output.spec.ts index a20db2029a..bc77f43be5 100644 --- a/test/cli-json-file-output.spec.ts +++ b/test/cli-json-file-output.spec.ts @@ -164,7 +164,7 @@ describe('test --json-file-output ', () => { ); if (isWindows) { - test( + test.skip( '`test --json-file-output can handle an absolute path`', () => { // if 'test-output' doesn't exist, created it From bd0adfb22b2a15830108e2882cd9d9cfed43e460 Mon Sep 17 00:00:00 2001 From: Ron Tal Date: Wed, 17 Mar 2021 14:51:23 +0200 Subject: [PATCH 3/3] chore: add new test folder to codeowners --- .github/CODEOWNERS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index 4421311c16..59c797f286 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -17,7 +17,7 @@ test/smoke/spec/iac/ @snyk/cloudconfig test/smoke/.iac-data/ @snyk/cloudconfig test/fixtures/sast/ @snyk/sast-team test/snyk-code-test.spec.ts @snyk/sast-team -test/iac-unit-tests/ @snyk/cloudconfig +test/jest/unit/iac-unit-tests/ @snyk/cloudconfig src/lib/errors/invalid-iac-file.ts @snyk/cloudconfig src/lib/errors/unsupported-options-iac-error.ts @snyk/cloudconfig help/commands-docs/iac-examples.md @snyk/cloudconfig