mirror of
https://github.com/github/codeql-action.git
synced 2026-05-07 14:20:19 +00:00
switch to using ava
This commit is contained in:
@@ -1,18 +1,20 @@
|
||||
import test from 'ava';
|
||||
|
||||
import * as analysisPaths from './analysis-paths';
|
||||
import * as configUtils from './config-utils';
|
||||
|
||||
test("emptyPaths", async () => {
|
||||
test("emptyPaths", async t => {
|
||||
let config = new configUtils.Config();
|
||||
analysisPaths.includeAndExcludeAnalysisPaths(config, []);
|
||||
expect(process.env['LGTM_INDEX_INCLUDE']).toBeUndefined();
|
||||
expect(process.env['LGTM_INDEX_EXCLUDE']).toBeUndefined();
|
||||
t.is(process.env['LGTM_INDEX_INCLUDE'], undefined);
|
||||
t.is(process.env['LGTM_INDEX_EXCLUDE'], undefined);
|
||||
});
|
||||
|
||||
test("nonEmptyPaths", async () => {
|
||||
test("nonEmptyPaths", async t => {
|
||||
let config = new configUtils.Config();
|
||||
config.paths.push('path1', 'path2');
|
||||
config.pathsIgnore.push('path3', 'path4');
|
||||
analysisPaths.includeAndExcludeAnalysisPaths(config, []);
|
||||
expect(process.env['LGTM_INDEX_INCLUDE']).toEqual('path1\npath2');
|
||||
expect(process.env['LGTM_INDEX_EXCLUDE']).toEqual('path3\npath4');
|
||||
});
|
||||
t.is(process.env['LGTM_INDEX_INCLUDE'], 'path1\npath2');
|
||||
t.is(process.env['LGTM_INDEX_EXCLUDE'], 'path3\npath4');
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user