Skip to content

Commit

Permalink
chore(deps): update dependency ava to v1 (#238)
Browse files Browse the repository at this point in the history
  • Loading branch information
renovate[bot] authored and ofrobots committed Dec 17, 2018
1 parent ce6a524 commit a77b6eb
Show file tree
Hide file tree
Showing 7 changed files with 1,020 additions and 1,901 deletions.
2,902 changes: 1,011 additions & 1,891 deletions package-lock.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@
"@types/rimraf": "^2.0.2",
"@types/tmp": "^0.0.33",
"@types/update-notifier": "^2.2.0",
"ava": "^0.25.0",
"ava": "^1.0.0",
"codecov": "^3.0.1",
"js-green-licenses": "^0.5.0",
"make-dir": "^1.2.0",
Expand Down
3 changes: 1 addition & 2 deletions test/fixtures.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
* limitations under the License.
*/

import {test, Test} from 'ava';
import * as fs from 'fs';
import * as makeDir from 'make-dir';
import * as path from 'path';
Expand Down Expand Up @@ -47,7 +46,7 @@ async function setupFixtures(dir: string, fixtures: Fixtures) {

export async function withFixtures(
fixtures: Fixtures,
fn: (fixturesDir: string) => Promise<{} | void>
fn: (fixturesDir: string) => PromiseLike<void>
) {
const keep = !!process.env.GTS_KEEP_TEMPDIRS;
const dir = tmp.dirSync({keep, unsafeCleanup: true});
Expand Down
4 changes: 2 additions & 2 deletions test/test-clean.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ const OPTIONS: Options = {
logger: {log: nop, error: nop, dir: nop},
};

test.failing.serial('should gracefully error if tsconfig is missing', t => {
test.serial.failing('should gracefully error if tsconfig is missing', t => {
return withFixtures({}, async () => {
await clean(OPTIONS);
});
Expand All @@ -59,7 +59,7 @@ test.serial('should avoid deleting .', t => {
);
});

test.failing.serial('should ensure that outDir is local to targetRoot', t => {
test.serial.failing('should ensure that outDir is local to targetRoot', t => {
return withFixtures(
{'tsconfig.json': JSON.stringify({compilerOptions: {outDir: '../out'}})},
async () => {
Expand Down
4 changes: 2 additions & 2 deletions test/test-format.ts
Original file line number Diff line number Diff line change
Expand Up @@ -221,8 +221,8 @@ test.serial('format should return error from failed spawn', async t => {
cb(new Error(MESSAGE));
});
};
await t.throws(format.format(OPTIONS, [], true), Error, MESSAGE);
await t.throws(format.format(OPTIONS, [], false), Error, MESSAGE);
await t.throwsAsync(format.format(OPTIONS, [], true), Error, MESSAGE);
await t.throwsAsync(format.format(OPTIONS, [], false), Error, MESSAGE);
format.clangFormat.spawnClangFormat = original;
}
);
Expand Down
2 changes: 1 addition & 1 deletion test/test-kitchen.ts
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ test.serial('use as a non-locally installed module', async t => {
t.deepEqual(tsconfig.extends, './node_modules/gts/tsconfig-google.json');

// server.ts has a lint error. Should error.
await t.throws(simpleExecp(`${GTS} check src/server.ts`, opts));
await t.throwsAsync(simpleExecp(`${GTS} check src/server.ts`, opts));

if (!keep) {
tmpDir.removeCallback();
Expand Down
4 changes: 2 additions & 2 deletions test/test-util.ts
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ test('should throw an error if it finds a circular reference', async t => {
myMap.set('/some/fake/directory/FAKE_CONFIG2', FAKE_CONFIG2);
myMap.set('/some/fake/directory/FAKE_CONFIG3', FAKE_CONFIG3);

await t.throws(
await t.throwsAsync(
getTSConfig(FAKE_DIRECTORY, createFakeReadFilep(myMap)),
Error,
'Circular Reference Detected'
Expand Down Expand Up @@ -141,7 +141,7 @@ test('function throws an error when reading a file that does not exist', async t
const FAKE_DIRECTORY = '/some/fake/directory';
const myMap = new Map();

await t.throws(
await t.throwsAsync(
getTSConfig(FAKE_DIRECTORY, createFakeReadFilep(myMap)),
Error,
`${FAKE_DIRECTORY}/tsconfig.json Not Found`
Expand Down

0 comments on commit a77b6eb

Please sign in to comment.