Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
address comments
  • Loading branch information
robertbrignull committed Jul 21, 2020
commit 0446cb0affd5436deed2ac1c92487aec2bb0edbb
6 changes: 4 additions & 2 deletions lib/config-utils.test.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion lib/config-utils.test.js.map

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions lib/testing-utils.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion lib/testing-utils.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 4 additions & 2 deletions src/config-utils.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ test("default queries are used", async t => {
process.env['GITHUB_WORKSPACE'] = tmpDir;

// Check that the default behaviour is to add the default queries.
// In this case if a config file is specified by does not include
// In this case if a config file is specified but does not include
// the disable-default-queries field.
// We determine this by whether CodeQL.resolveQueries is called
// with the correct arguments.
Expand All @@ -225,7 +225,9 @@ test("default queries are used", async t => {
},
});

// Just create a generic config object with non-default values for all fields
// The important point of this config is that is doesn't specify
// the disable-default-queries field.
// Any other details are hopefully irrelevant for this tetst.
const inputFileContents = `
paths:
- foo`;
Expand Down
4 changes: 2 additions & 2 deletions src/testing-utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,10 +51,10 @@ export function setupTests(test: TestInterface<any>) {
process.stderr.write = wrapOutput(t.context) as any;

// Many tests modify environment variables. Take a copy now so that
// We reset them after the test to keep tests independent of each other.
// we reset them after the test to keep tests independent of each other.
// process.env only has strings fields, so a shallow copy is fine.
t.context.env = {};
Object.assign(process.env, t.context.env);
Object.assign(t.context.env, process.env);
});

typedTest.afterEach.always(t => {
Expand Down