deps: bump deno std

This commit is contained in:
Dmitriy Pleshevskiy 2022-11-19 16:32:54 +03:00
parent 84ad5f6489
commit 16ced3d449
Signed by: pleshevskiy
GPG key ID: 1B59187B161C0215
2 changed files with 13 additions and 4 deletions

9
deno.lock Normal file
View file

@ -0,0 +1,9 @@
{
"version": "2",
"remote": {
"https://deno.land/std@0.165.0/fmt/colors.ts": "9e36a716611dcd2e4865adea9c4bec916b5c60caad4cdcdc630d4974e6bb8bd4",
"https://deno.land/std@0.165.0/testing/_diff.ts": "a23e7fc2b4d8daa3e158fa06856bedf5334ce2a2831e8bf9e509717f455adb2c",
"https://deno.land/std@0.165.0/testing/_format.ts": "cd11136e1797791045e639e9f0f4640d5b4166148796cad37e6ef75f7d7f3832",
"https://deno.land/std@0.165.0/testing/asserts.ts": "1e340c589853e82e0807629ba31a43c84ebdcdeca910c4a9705715dfdb0f5ce8"
}
}

View file

@ -17,9 +17,9 @@
import { import {
assertEquals, assertEquals,
assertRejects,
assertThrows, assertThrows,
assertThrowsAsync, } from "https://deno.land/std@0.165.0/testing/asserts.ts";
} from "https://deno.land/std@0.105.0/testing/asserts.ts";
import * as fsm from "./fsm.ts"; import * as fsm from "./fsm.ts";
enum ProjectStatus { enum ProjectStatus {
@ -168,7 +168,7 @@ Deno.test("should throw error if transition to the state doesn't exist", () => {
const sm = new fsm.StateMachineBuilder() const sm = new fsm.StateMachineBuilder()
.withStates(Object.values(ProjectStatus)) .withStates(Object.values(ProjectStatus))
.build(ProjectStatus.Pending); .build(ProjectStatus.Pending);
assertThrowsAsync( assertRejects(
() => sm.tryChangeState(ProjectStatus.Active, null), () => sm.tryChangeState(ProjectStatus.Active, null),
fsm.FsmError, fsm.FsmError,
`cannot change state from "${ProjectStatus.Pending}" to "${ProjectStatus.Active}"`, `cannot change state from "${ProjectStatus.Pending}" to "${ProjectStatus.Active}"`,
@ -195,7 +195,7 @@ Deno.test("should throw error if beforeExit action returns false", () => {
[ProjectStatus.Pending, [ProjectStatus.Active]], [ProjectStatus.Pending, [ProjectStatus.Active]],
]) ])
.build(ProjectStatus.Pending); .build(ProjectStatus.Pending);
assertThrowsAsync( assertRejects(
() => sm.tryChangeState(ProjectStatus.Active, null), () => sm.tryChangeState(ProjectStatus.Active, null),
fsm.FsmError, fsm.FsmError,
`cannot change state from "${ProjectStatus.Pending}" to "${ProjectStatus.Active}"`, `cannot change state from "${ProjectStatus.Pending}" to "${ProjectStatus.Active}"`,