Skip to content

Commit 3372322

Browse files
authored
test: Replace mocha-chai-jest-snapshot with @ota-meshi/test-snapshot (#654)
1 parent 1cffeba commit 3372322

File tree

3 files changed

+20
-20
lines changed

3 files changed

+20
-20
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,7 @@
6767
"@changesets/cli": "^2.27.10",
6868
"@changesets/get-release-plan": "^4.0.5",
6969
"@ota-meshi/eslint-plugin": "^0.17.6",
70+
"@ota-meshi/test-snapshot": "^1.1.0",
7071
"@types/benchmark": "^2.1.5",
7172
"@types/chai": "^5.0.0",
7273
"@types/eslint": "^9.6.1",
@@ -100,7 +101,6 @@
100101
"locate-character": "^3.0.0",
101102
"magic-string": "^0.30.14",
102103
"mocha": "^11.0.0",
103-
"mocha-chai-jest-snapshot": "^1.1.6",
104104
"prettier": "~3.4.1",
105105
"prettier-plugin-pkg": "^0.18.1",
106106
"prettier-plugin-svelte": "^3.3.2",

tests/src/parser/__snapshots__/html.ts.snap

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Jest Snapshot v1, https://goo.gl/fbAQLP
1+
// test-snapshot v1
22

33
exports[`parseAttributes (empty) 1`] = `
44
Object {
@@ -106,6 +106,21 @@ Object {
106106
}
107107
`;
108108
109+
exports[`parseAttributes attr 1`] = `
110+
Object {
111+
"attributes": Array [
112+
Object {
113+
"end": 4,
114+
"name": "attr",
115+
"start": 0,
116+
"type": "Attribute",
117+
"value": true,
118+
},
119+
],
120+
"index": 4,
121+
}
122+
`;
123+
109124
exports[`parseAttributes attr 1`] = `
110125
Object {
111126
"attributes": Array [
@@ -144,21 +159,6 @@ Object {
144159
}
145160
`;
146161
147-
exports[`parseAttributes attr 1`] = `
148-
Object {
149-
"attributes": Array [
150-
Object {
151-
"end": 4,
152-
"name": "attr",
153-
"start": 0,
154-
"type": "Attribute",
155-
"value": true,
156-
},
157-
],
158-
"index": 4,
159-
}
160-
`;
161-
162162
exports[`parseAttributes attr="value" 1`] = `
163163
Object {
164164
"attributes": Array [

tests/src/parser/html.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
import * as chai from "chai";
2-
import { jestSnapshotPlugin } from "mocha-chai-jest-snapshot";
2+
import { chaiPlugin } from "@ota-meshi/test-snapshot/chai";
33

4-
import { parseAttributes } from "../../../src/parser/html";
4+
import { parseAttributes } from "../../../src/parser/html.js";
55

6-
chai.use(jestSnapshotPlugin());
6+
chai.use(chaiPlugin);
77
describe("parseAttributes", () => {
88
const testCases = [
99
{

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy