Replace all remaining t.asserts with t.ok
MODIFY
packages/transform-module/test/export-default.test.js
packages/transform-module/test/export-default.test.js
@@ -84,7 +84,7 @@ export default this;`);
t.equal(ns2.default, undefined, 'this is undefined');
} catch (e) {
console.log('unexpected exception', e);
- t.assert(false, e);
+ t.ok(false, e);
} finally {
t.end();
}

MODIFY
packages/transform-module/test/export-named.test.js
packages/transform-module/test/export-named.test.js
@@ -95,7 +95,7 @@ export const { def, nest: [, ghi, ...nestrest], ...rest } = { def: 456, nest: [
);
} catch (e) {
console.log('unexpected exception', e);
- t.assert(false, e);
+ t.ok(false, e);
} finally {
t.end();
}
@@ -165,25 +165,25 @@ test(`export class`, async t => {
export let count = 0;
export class C {} if (C) { count += 1; }
`);
- t.assert(new C(), `class exports`);
+ t.ok(new C(), `class exports`);
t.equal(C.name, 'C', `class is named C`);
t.equal(count, 1, `class C is global`);
const { default: C2 } = await evaluateModule(`\
export default class C {}
`);
- t.assert(new C2(), `default class constructs`);
+ t.ok(new C2(), `default class constructs`);
t.equal(C2.name, 'C', `C class name`);
const { default: C3 } = await evaluateModule(`\
export default class {}
`);
- t.assert(new C3(), `default class constructs`);
+ t.ok(new C3(), `default class constructs`);
t.equal(C3.name, 'default', `default class name`);
const { default: C4 } = await evaluateModule(`\
export default (class {});
`);
- t.assert(new C4(), `default class expression constructs`);
+ t.ok(new C4(), `default class expression constructs`);
t.equal(C4.name, 'default', `default class expression name`);
const { F: F0 } = await evaluateModule(`\
@@ -197,7 +197,7 @@ export default async function F(arg) { return arg; }
`);
t.equal(F.name, 'F', `F function name`);
const ret = F('foo');
- t.assert(ret instanceof Promise, `F is async`);
+ t.ok(ret instanceof Promise, `F is async`);
t.equal(await ret, 'foo', `F returns correctly`);
const { default: F2 } = await evaluateModule(`\
@@ -206,7 +206,7 @@ export default async function(arg) { return arg; };
t.equal(F2.name, 'default', `F2 function default name`);
} catch (e) {
console.log('unexpected exception', e);
- t.assert(false, e);
+ t.ok(false, e);
} finally {
t.end();
}

MODIFY
packages/transform-module/test/sanity.test.js
packages/transform-module/test/sanity.test.js
@@ -59,7 +59,7 @@ new outer().f();
);
} catch (e) {
console.log('unexpected exception', e);
- t.assert(false, e);
+ t.ok(false, e);
} finally {
t.end();
}

Replace all remaining t.asserts with t.ok