Skip to content

Commit

Permalink
Use jsr:@std for testing.
Browse files Browse the repository at this point in the history
  • Loading branch information
dajiaji committed Aug 9, 2024
1 parent 2803aef commit 4730cf7
Show file tree
Hide file tree
Showing 51 changed files with 216 additions and 349 deletions.
3 changes: 2 additions & 1 deletion core/deno.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
{
"imports": {
"@deno/dnt": "jsr:@deno/dnt@^0.41.2",
"testing/": "https://deno.land/std@0.224.0/testing/"
"@std/assert": "jsr:@std/assert@1.0.0",
"@std/testing": "jsr:@std/testing@^1.0.0"
},
"fmt": {
"include": [
Expand Down
58 changes: 19 additions & 39 deletions core/deno.lock

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

4 changes: 2 additions & 2 deletions core/test/cipherSuite.test.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { assertEquals, assertRejects, assertThrows } from "testing/asserts.ts";
import { describe, it } from "testing/bdd.ts";
import { assertEquals, assertRejects, assertThrows } from "@std/assert";
import { describe, it } from "@std/testing/bdd";

import {
AeadId,
Expand Down
4 changes: 2 additions & 2 deletions core/test/runtimes/bun/core.spec.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { assertEquals } from "testing/asserts.ts";
import { describe, it } from "testing/bdd.ts";
import { assertEquals } from "@std/assert";
import { describe, it } from "@std/testing/bdd";

describe("Bun", () => {
describe("GET /test?kem=0x0010", () => {
Expand Down
4 changes: 2 additions & 2 deletions core/test/runtimes/cloudflare/core.spec.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { assertEquals } from "testing/asserts.ts";
import { describe, it } from "testing/bdd.ts";
import { assertEquals } from "@std/assert";
import { describe, it } from "@std/testing/bdd";

describe("Cloudflare Workers", () => {
describe("GET /test?kem=0x0010", () => {
Expand Down
3 changes: 2 additions & 1 deletion deno.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
{
"imports": {
"@deno/dnt": "jsr:@deno/dnt@^0.41.2",
"testing/": "https://deno.land/std@0.224.0/testing/"
"@std/assert": "jsr:@std/assert@1.0.0",
"@std/testing": "jsr:@std/testing@^1.0.0"
},
"fmt": {
"include": [
Expand Down
58 changes: 19 additions & 39 deletions deno.lock

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

4 changes: 2 additions & 2 deletions test/bignum.test.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { assertEquals, assertThrows } from "testing/asserts.ts";
import { assertEquals, assertThrows } from "@std/assert";

import { describe, it } from "testing/bdd.ts";
import { describe, it } from "@std/testing/bdd";

import { Bignum } from "../src/utils/bignum.ts";

Expand Down
4 changes: 2 additions & 2 deletions test/cipherSuite.test.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { assertEquals, assertRejects, assertThrows } from "testing/asserts.ts";
import { describe, it } from "testing/bdd.ts";
import { assertEquals, assertRejects, assertThrows } from "@std/assert";
import { describe, it } from "@std/testing/bdd";

import * as errors from "../src/errors.ts";
import { AeadId, KdfId, KemId } from "../src/identifiers.ts";
Expand Down
4 changes: 2 additions & 2 deletions test/cipherSuiteBackwardCompat.test.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { assertEquals, assertRejects, assertThrows } from "testing/asserts.ts";
import { assertEquals, assertRejects, assertThrows } from "@std/assert";

import { describe, it } from "testing/bdd.ts";
import { describe, it } from "@std/testing/bdd";

import { Aead, Kdf, Kem } from "../src/identifiers.ts"; // deprecated identifiers as the test target.
import { CipherSuite } from "../src/cipherSuite.ts";
Expand Down
4 changes: 2 additions & 2 deletions test/cipherSuiteNative.test.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { assertEquals, assertRejects, assertThrows } from "testing/asserts.ts";
import { describe, it } from "testing/bdd.ts";
import { assertEquals, assertRejects, assertThrows } from "@std/assert";
import { describe, it } from "@std/testing/bdd";

import {
AeadId,
Expand Down
2 changes: 1 addition & 1 deletion test/conformance.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { afterAll, beforeAll, describe, it } from "testing/bdd.ts";
import { afterAll, beforeAll, describe, it } from "@std/testing/bdd";

import type { ConformanceTester } from "./conformanceTester.ts";
import type { TestVector } from "./testVector.ts";
Expand Down
2 changes: 1 addition & 1 deletion test/conformanceTester.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { assertEquals, assertRejects } from "testing/asserts.ts";
import { assertEquals, assertRejects } from "@std/assert";

import type { PreSharedKey } from "../src/interfaces/preSharedKey.ts";
import type { XCryptoKey } from "../src/xCryptoKey.ts";
Expand Down
4 changes: 2 additions & 2 deletions test/dhkemPrimitives.test.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { assertEquals, assertRejects } from "testing/asserts.ts";
import { describe, it } from "testing/bdd.ts";
import { assertEquals, assertRejects } from "@std/assert";
import { describe, it } from "@std/testing/bdd";

import * as errors from "../src/errors.ts";
import { KemId } from "../src/identifiers.ts";
Expand Down
4 changes: 2 additions & 2 deletions test/encryptionContext.test.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { assertEquals, assertRejects, assertThrows } from "testing/asserts.ts";
import { describe, it } from "testing/bdd.ts";
import { assertEquals, assertRejects, assertThrows } from "@std/assert";
import { describe, it } from "@std/testing/bdd";

import { Aes128Gcm } from "../src/aeads/aesGcm.ts";
import { ExportOnly } from "../src/aeads/exportOnly.ts";
Expand Down
4 changes: 2 additions & 2 deletions test/errors.test.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { assertEquals } from "testing/asserts.ts";
import { assertEquals } from "@std/assert";

import { describe, it } from "testing/bdd.ts";
import { describe, it } from "@std/testing/bdd";

import * as errors from "../src/errors.ts";

Expand Down
4 changes: 2 additions & 2 deletions test/kdfContext.test.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { assertEquals, assertRejects } from "testing/asserts.ts";
import { assertEquals, assertRejects } from "@std/assert";

import { describe, it } from "testing/bdd.ts";
import { describe, it } from "@std/testing/bdd";

import { HkdfSha256 } from "../src/kdfs/hkdfSha256.ts";
import { HkdfSha384 } from "../src/kdfs/hkdfSha384.ts";
Expand Down
4 changes: 2 additions & 2 deletions test/kemContext.test.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { assertEquals, assertRejects } from "testing/asserts.ts";
import { describe, it } from "testing/bdd.ts";
import { assertEquals, assertRejects } from "@std/assert";
import { describe, it } from "@std/testing/bdd";

import * as errors from "../src/errors.ts";
import { KemId } from "../src/identifiers.ts";
Expand Down
2 changes: 1 addition & 1 deletion test/keyValidationEc.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { afterAll, beforeAll, describe, it } from "testing/bdd.ts";
import { afterAll, beforeAll, describe, it } from "@std/testing/bdd";

import type { ConformanceTester } from "./conformanceTester.ts";
import type { WycheproofTestVector } from "./testVector.ts";
Expand Down
2 changes: 1 addition & 1 deletion test/keyValidationX25519.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { afterAll, beforeAll, describe, it } from "testing/bdd.ts";
import { afterAll, beforeAll, describe, it } from "@std/testing/bdd";

import type { ConformanceTester } from "./conformanceTester.ts";
import type { WycheproofTestVector } from "./testVector.ts";
Expand Down
2 changes: 1 addition & 1 deletion test/keyValidationX448.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { afterAll, beforeAll, describe, it } from "testing/bdd.ts";
import { afterAll, beforeAll, describe, it } from "@std/testing/bdd";

import type { ConformanceTester } from "./conformanceTester.ts";
import type { WycheproofTestVector } from "./testVector.ts";
Expand Down
4 changes: 2 additions & 2 deletions test/misc.test.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { assertEquals, assertThrows } from "testing/asserts.ts";
import { describe, it } from "testing/bdd.ts";
import { assertEquals, assertThrows } from "@std/assert";
import { describe, it } from "@std/testing/bdd";

import { xor } from "../src/encryptionContext.ts";
import { i2Osp } from "../src/utils/misc.ts";
Expand Down
4 changes: 2 additions & 2 deletions test/runtimes/bun/hpke.spec.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { assertEquals } from "testing/asserts.ts";
import { describe, it } from "testing/bdd.ts";
import { assertEquals } from "@std/assert";
import { describe, it } from "@std/testing/bdd";

describe("Cloudflare Workers", () => {
describe("GET /test?kem=0x0010", () => {
Expand Down
Loading

0 comments on commit 4730cf7

Please sign in to comment.