Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
gfx committed Sep 8, 2023
1 parent 84418e9 commit 1234418
Show file tree
Hide file tree
Showing 23 changed files with 26 additions and 26 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
"test:dist": "npm run lint && npm run test && npm run test:browser && npm run test:deno",
"test:cover": "npm run cover:clean && npx nyc --no-clean npm run 'test' && npm run cover:report",
"test:deno": "deno test test/deno_test.ts",
"test:fuzz": "npm exec --yes -- jsfuzz@git+https://gitlab.com/gitlab-org/security-products/analyzers/fuzzers/jsfuzz.git --fuzzTime 60 --no-versifier test/decode.jsfuzz.js corpus",
"test:fuzz": "npm exec --yes -- jsfuzz@git+https://gitlab.com/gitlab-org/security-products/analyzers/fuzzers/jsfuzz.git#39e6cf16613a0e30c7a7953f62e64292dbd5d3f3 --fuzzTime 60 --no-versifier test/decode.jsfuzz.js corpus",
"cover:clean": "rimraf .nyc_output coverage/",
"cover:report": "npx nyc report --reporter=text-summary --reporter=html --reporter=json",
"test:browser": "karma start --single-run",
Expand Down
2 changes: 1 addition & 1 deletion test/CachedKeyDecoder.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import assert from "assert";
import assert from "node:assert";
import { CachedKeyDecoder, KeyDecoder } from "../src/CachedKeyDecoder";
import { utf8EncodeJs, utf8Count } from "../src/utils/utf8";

Expand Down
4 changes: 2 additions & 2 deletions test/ExtensionCodec.test.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import assert from "assert";
import util from "util";
import assert from "node:assert";
import util from "node:util";
import { encode, decode, ExtensionCodec, decodeAsync } from "../src";

describe("ExtensionCodec", () => {
Expand Down
2 changes: 1 addition & 1 deletion test/bigint64.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import assert from "assert";
import assert from "node:assert";
import { encode, decode } from "../src";

describe("useBigInt64: true", () => {
Expand Down
2 changes: 1 addition & 1 deletion test/codec-bigint.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import assert from "assert";
import assert from "node:assert";
import { encode, decode, ExtensionCodec, DecodeError } from "../src";

// There's a built-in `useBigInt64: true` option, but a custom codec might be
Expand Down
2 changes: 1 addition & 1 deletion test/codec-float.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import assert from "assert";
import assert from "node:assert";
import { decode } from "../src";
import * as ieee754 from "ieee754";

Expand Down
2 changes: 1 addition & 1 deletion test/codec-int.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import assert from "assert";
import assert from "node:assert";
import { setInt64, getInt64, getUint64, setUint64 } from "../src/utils/int";

const INT64SPECS = {
Expand Down
4 changes: 2 additions & 2 deletions test/codec-timestamp.test.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import assert from "assert";
import util from "util";
import assert from "node:assert";
import util from "node:util";
import {
encode,
decode,
Expand Down
2 changes: 1 addition & 1 deletion test/decode-blob.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import assert from "assert";
import assert from "node:assert";
import { encode, decode, decodeAsync } from "@msgpack/msgpack";

(typeof Blob !== "undefined" ? describe : describe.skip)("Blob", () => {
Expand Down
2 changes: 1 addition & 1 deletion test/decode-max-length.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import assert from "assert";
import assert from "node:assert";
import { encode, decode, decodeAsync } from "../src";
import type { DecoderOptions } from "../src";

Expand Down
2 changes: 1 addition & 1 deletion test/decode.jsfuzz.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* eslint-disable */
const assert = require("assert");
const assert = require("node:assert");
const { Decoder, encode, DecodeError } = require("../dist/index.js");

/**
Expand Down
2 changes: 1 addition & 1 deletion test/decodeArrayStream.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import assert from "assert";
import assert from "node:assert";
import { encode, decodeArrayStream } from "../src";

describe("decodeArrayStream", () => {
Expand Down
2 changes: 1 addition & 1 deletion test/decodeAsync.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import assert from "assert";
import assert from "node:assert";
import { encode, decodeAsync } from "../src";

describe("decodeAsync", () => {
Expand Down
2 changes: 1 addition & 1 deletion test/decodeMulti.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import assert from "assert";
import assert from "node:assert";
import { encode, decodeMulti } from "@msgpack/msgpack";

describe("decodeMulti", () => {
Expand Down
2 changes: 1 addition & 1 deletion test/decodeMultiStream.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import assert from "assert";
import assert from "node:assert";
import { encode, decodeMultiStream } from "@msgpack/msgpack";

describe("decodeStream", () => {
Expand Down
2 changes: 1 addition & 1 deletion test/edge-cases.test.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// kind of hand-written fuzzing data
// any errors should not break Encoder/Decoder instance states
import assert from "assert";
import assert from "node:assert";
import { encode, decodeAsync, decode, Encoder, Decoder, decodeMulti, decodeMultiStream } from "../src";
import { DataViewIndexOutOfBoundsError } from "../src/Decoder";

Expand Down
2 changes: 1 addition & 1 deletion test/encode.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import assert from "assert";
import assert from "node:assert";
import { encode, decode } from "@msgpack/msgpack";

describe("encode", () => {
Expand Down
2 changes: 1 addition & 1 deletion test/msgpack-ext.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import assert from "assert";
import assert from "node:assert";
import { encode, decode, ExtData } from "../src";

function seq(n: number) {
Expand Down
4 changes: 2 additions & 2 deletions test/msgpack-test-suite.test.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import assert from "assert";
import util from "util";
import assert from "node:assert";
import util from "node:util";
import { Exam } from "msgpack-test-js";
import { MsgTimestamp } from "msg-timestamp";
import { encode, decode, ExtensionCodec, EXT_TIMESTAMP, encodeTimeSpecToTimestamp } from "@msgpack/msgpack";
Expand Down
2 changes: 1 addition & 1 deletion test/prototype-pollution.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { throws } from "assert";
import { throws } from "node:assert";
import { encode, decode, DecodeError } from "@msgpack/msgpack";

describe("prototype pollution", () => {
Expand Down
2 changes: 1 addition & 1 deletion test/readme.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { deepStrictEqual } from "assert";
import { deepStrictEqual } from "node:assert";
import { encode, decode } from "@msgpack/msgpack";

describe("README", () => {
Expand Down
2 changes: 1 addition & 1 deletion test/reuse-instances.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { deepStrictEqual } from "assert";
import { deepStrictEqual } from "node:assert";
import { Encoder, Decoder, decode } from "@msgpack/msgpack";

const createStream = async function* (...args: any) {
Expand Down
2 changes: 1 addition & 1 deletion test/whatwg-streams.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { deepStrictEqual } from "assert";
import { deepStrictEqual } from "node:assert";
import { decodeAsync, encode, decodeArrayStream } from "@msgpack/msgpack";

const isReadableStreamConstructorAvailable: boolean = (() => {
Expand Down

0 comments on commit 1234418

Please sign in to comment.