Skip to content

Commit

Permalink
chore: switch to @std/expect
Browse files Browse the repository at this point in the history
Signed-off-by: Jérôme Benoit <[email protected]>
  • Loading branch information
jerome-benoit committed Nov 16, 2024
1 parent 76f47bd commit 4a7e1ac
Show file tree
Hide file tree
Showing 14 changed files with 201 additions and 362 deletions.
2 changes: 1 addition & 1 deletion .npmrc
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
ignore-workspace-root-check=true
@jsr:registry=https://npm.jsr.io
auto-install-peers=true
legacy-peer-deps=true
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@
"logform": "^2.7.0",
"mnemonist": "0.40.0-rc1",
"mongodb": "^6.10.0",
"poolifier": "^4.4.4",
"poolifier": "^4.4.5",
"rambda": "^9.4.0",
"tar": "^7.4.3",
"winston": "^3.17.0",
Expand All @@ -115,6 +115,7 @@
"@commitlint/config-conventional": "^19.5.0",
"@eslint/js": "^9.14.0",
"@mikro-orm/cli": "^6.4.0",
"@std/expect": "npm:@jsr/std__expect@^1.0.8",
"@types/node": "^22.9.0",
"@types/semver": "^7.5.8",
"@types/ws": "^8.5.13",
Expand All @@ -129,7 +130,6 @@
"eslint-plugin-jsdoc": "^50.5.0",
"eslint-plugin-perfectionist": "^3.9.1",
"eslint-plugin-vue": "^9.31.0",
"expect": "^29.7.0",
"glob": "^11.0.0",
"husky": "^9.1.6",
"lint-staged": "^15.2.10",
Expand Down
529 changes: 184 additions & 345 deletions pnpm-lock.yaml

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion tests/charging-station/Helpers.test.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* eslint-disable @typescript-eslint/no-unsafe-member-access */
import { expect } from 'expect'
import { expect } from '@std/expect'
import { describe, it } from 'node:test'

import type { ChargingStation } from '../../src/charging-station/index.js'
Expand Down
2 changes: 1 addition & 1 deletion tests/exception/BaseError.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { expect } from 'expect'
import { expect } from '@std/expect'
import { describe, it } from 'node:test'

import { BaseError } from '../../src/exception/BaseError.js'
Expand Down
2 changes: 1 addition & 1 deletion tests/exception/OCPPError.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { expect } from 'expect'
import { expect } from '@std/expect'
import { describe, it } from 'node:test'

import { OCPPError } from '../../src/exception/OCPPError.js'
Expand Down
2 changes: 1 addition & 1 deletion tests/types/ConfigurationData.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { expect } from 'expect'
import { expect } from '@std/expect'
import { describe, it } from 'node:test'

import {
Expand Down
2 changes: 1 addition & 1 deletion tests/utils/AsyncLock.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { expect } from 'expect'
import { expect } from '@std/expect'
import { randomInt } from 'node:crypto'
import { describe, it } from 'node:test'

Expand Down
2 changes: 1 addition & 1 deletion tests/utils/ConfigurationUtils.test.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* eslint-disable @typescript-eslint/no-unsafe-member-access */
import { expect } from 'expect'
import { expect } from '@std/expect'
import { describe, it } from 'node:test'

import { FileType } from '../../src/types/index.js'
Expand Down
2 changes: 1 addition & 1 deletion tests/utils/ElectricUtils.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { expect } from 'expect'
import { expect } from '@std/expect'
import { describe, it } from 'node:test'

import { ACElectricUtils, DCElectricUtils } from '../../src/utils/ElectricUtils.js'
Expand Down
2 changes: 1 addition & 1 deletion tests/utils/ErrorUtils.test.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* eslint-disable @typescript-eslint/no-unsafe-member-access */
import { expect } from 'expect'
import { expect } from '@std/expect'
import { describe, it } from 'node:test'

import type { ChargingStation } from '../../src/charging-station/index.js'
Expand Down
2 changes: 1 addition & 1 deletion tests/utils/StatisticUtils.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { expect } from 'expect'
import { expect } from '@std/expect'
import { describe, it } from 'node:test'

import { max, min, nthPercentile, stdDeviation } from '../../src/utils/StatisticUtils.js'
Expand Down
8 changes: 4 additions & 4 deletions tests/utils/Utils.test.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { expect } from '@std/expect'
import { hoursToMilliseconds, hoursToSeconds } from 'date-fns'
import { expect } from 'expect'
import { CircularBuffer } from 'mnemonist'
import { randomInt } from 'node:crypto'
import { version } from 'node:process'
Expand Down Expand Up @@ -298,7 +298,7 @@ await describe('Utils test suite', async () => {
expect(clone(date) === date).toBe(false)
if (runtime === runtimes.node && satisfies(version, '>=22.0.0')) {
const url = new URL('https://domain.tld')
expect(() => clone(url)).toThrowError(new Error('Cannot clone object of unsupported type.'))
expect(() => clone(url)).toThrow(new Error('Cannot clone object of unsupported type.'))
}
const map = new Map([['1', '2']])
expect(clone(map)).toStrictEqual(map)
Expand All @@ -307,9 +307,9 @@ await describe('Utils test suite', async () => {
expect(clone(set)).toStrictEqual(set)
expect(clone(set) === set).toBe(false)
const weakMap = new WeakMap([[{ 1: 1 }, { 2: 2 }]])
expect(() => clone(weakMap)).toThrowError(new Error('#<WeakMap> could not be cloned.'))
expect(() => clone(weakMap)).toThrow(new Error('#<WeakMap> could not be cloned.'))
const weakSet = new WeakSet([{ 1: 1 }, { 2: 2 }])
expect(() => clone(weakSet)).toThrowError(new Error('#<WeakSet> could not be cloned.'))
expect(() => clone(weakSet)).toThrow(new Error('#<WeakSet> could not be cloned.'))
})

await it('Verify isNotEmptyString()', () => {
Expand Down
2 changes: 1 addition & 1 deletion ui/web/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
"dependencies": {
"finalhandler": "^1.3.1",
"serve-static": "^1.16.2",
"vue": "^3.5.12",
"vue": "^3.5.13",
"vue-router": "^4.4.5",
"vue-toast-notification": "^3.1.3"
},
Expand Down

0 comments on commit 4a7e1ac

Please sign in to comment.