Skip to content

Commit 71c3a3e

Browse files
committed
esm migration for tests
1 parent 77ed8ac commit 71c3a3e

File tree

3 files changed

+4
-8
lines changed

3 files changed

+4
-8
lines changed

.mocharc.js

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
1-
'use strict';
1+
import "ts-node/register";
22

3-
require("ts-node/register");
4-
5-
module.exports = {
3+
export default {
64
diff: true,
75
extension: ['ts'],
86
package: '../package.json',

test/decode-blob.test.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,6 @@ import { encode, decode, decodeAsync } from "../src/index.ts";
1818
this.skip();
1919
}
2020

21-
// use any because the type of Blob#stream() in @types/node does not make sense here.
22-
// eslint-disable-next-line @typescript-eslint/no-unsafe-argument
23-
assert.deepStrictEqual(await decodeAsync(blob.stream() as any), "Hello!");
21+
assert.deepStrictEqual(await decodeAsync(blob.stream()), "Hello!");
2422
});
2523
});

test/readme.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { deepStrictEqual } from "assert";
2-
import { encode, decode } from "../src/index";
2+
import { encode, decode } from "../src/index.ts";
33

44
describe("README", () => {
55
context("## Synopsis", () => {

0 commit comments

Comments
 (0)