Skip to content

Commit de63822

Browse files
Update vitest monorepo to v1 (major) (#71)
* Update vitest monorepo to v1 * Update snapshots to new format --------- Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Ivan Demchuk <ivan.demchuk@gmail.com>
1 parent f0352a1 commit de63822

File tree

7 files changed

+165
-406
lines changed

7 files changed

+165
-406
lines changed
-246 Bytes
Binary file not shown.
-108 Bytes
Binary file not shown.

__tests__/frameworks/vite/errors.spec.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,8 @@ describe('Error checking', () => {
2929

3030
// Assert
3131
await expect(code).rejects.toThrowErrorMatchingInlineSnapshot(`
32-
"Fluent parse errors:
33-
E0003: Expected token: \\"}\\" (2:31)
32+
[Error: Fluent parse errors:
33+
E0003: Expected token: "}" (2:31)
3434
1 | # Simple things are simple.
3535
2 | hello-user = Hello, {$userName!
3636
| ^
@@ -42,7 +42,7 @@ describe('Error checking', () => {
4242
9 | }to {$userGender ->
4343
| ^
4444
10 | [male] his stream
45-
11 | [female] her stream"
45+
11 | [female] her stream]
4646
`)
4747
})
4848

@@ -62,8 +62,8 @@ describe('Error checking', () => {
6262

6363
// Assert
6464
await expect(code).rejects.toThrowErrorMatchingInlineSnapshot(`
65-
"Fluent parse errors:
66-
E0003: Expected token: \\"}\\" (2:31)
65+
[Error: Fluent parse errors:
66+
E0003: Expected token: "}" (2:31)
6767
1 | # Simple things are simple.
6868
2 | hello-user = Hello, {$userName!
6969
| ^
@@ -75,7 +75,7 @@ describe('Error checking', () => {
7575
9 | }to {$userGender ->
7676
| ^
7777
10 | [male] his stream
78-
11 | [female] her stream"
78+
11 | [female] her stream]
7979
`)
8080
})
8181
})

__tests__/frameworks/vite/external.spec.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -93,15 +93,15 @@ describe('Vite external', () => {
9393
// Assert
9494
expect(code).toMatchInlineSnapshot(`
9595
"=== /fixtures/importer.js ===
96-
import translations from \\"/@id/virtual:ftl-for-file?importer=/fixtures/importer.js\\"
96+
import translations from "/@id/virtual:ftl-for-file?importer=/fixtures/importer.js"
9797
9898
// eslint-disable-next-line no-console -- this is a test file
9999
console.log(translations)
100100
101101
102102
=== virtual:ftl-for-file?importer=/fixtures/importer.js ===
103-
import en_ftl from \\"/fixtures/ftl/en/importer.js.ftl?import\\";
104-
import da_ftl from \\"/fixtures/ftl/da/importer.js.ftl?import\\";
103+
import en_ftl from "/fixtures/ftl/en/importer.js.ftl?import";
104+
import da_ftl from "/fixtures/ftl/da/importer.js.ftl?import";
105105
export default { 'en': en_ftl, 'da': da_ftl }
106106
"
107107
`)

__tests__/frameworks/webpack/__snapshots__/sfc.spec.ts.snap

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import { FluentResource } from '@fluent/bundle'
88
export default function (Component) {
99
const target = Component.options || Component
1010
target.fluent = target.fluent || {}
11-
target.fluent['en'] = new FluentResource(\\"# Simple things are simple.\\\\nhello-user = Hello, {$userName}!\\\\n\\\\n# Complex things are possible.\\\\nshared-photos =\\\\n {$userName} {$photoCount ->\\\\n [one] added one photo\\\\n *[other] added {$photoCount} new photos\\\\n } to {$userGender ->\\\\n [male] his stream\\\\n [female] her stream\\\\n *[other] their stream\\\\n }.\\")
11+
target.fluent['en'] = new FluentResource("# Simple things are simple.\\nhello-user = Hello, {$userName}!\\n\\n# Complex things are possible.\\nshared-photos =\\n {$userName} {$photoCount ->\\n [one] added one photo\\n *[other] added {$photoCount} new photos\\n } to {$userGender ->\\n [male] his stream\\n [female] her stream\\n *[other] their stream\\n }.")
1212
}
1313
",
1414
]
@@ -22,7 +22,7 @@ import { FluentResource } from '@fluent/bundle'
2222
export default function (Component) {
2323
const target = Component.options || Component
2424
target.fluent = target.fluent || {}
25-
target.fluent['en'] = new FluentResource(\\"# Simple things are simple.\\\\nhello-user = Hello, {$userName}!\\\\n\\\\n# Complex things are possible.\\\\nshared-photos =\\\\n {$userName} {$photoCount ->\\\\n [one] added one photo\\\\n *[other] added {$photoCount} new photos\\\\n } to {$userGender ->\\\\n [male] his stream\\\\n [female] her stream\\\\n *[other] their stream\\\\n }.\\")
25+
target.fluent['en'] = new FluentResource("# Simple things are simple.\\nhello-user = Hello, {$userName}!\\n\\n# Complex things are possible.\\nshared-photos =\\n {$userName} {$photoCount ->\\n [one] added one photo\\n *[other] added {$photoCount} new photos\\n } to {$userGender ->\\n [male] his stream\\n [female] her stream\\n *[other] their stream\\n }.")
2626
}
2727
",
2828
]

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@
7272
"@release-it-plugins/lerna-changelog": "6.0.0",
7373
"@types/node": "20.10.5",
7474
"@vitejs/plugin-vue": "5.0.0",
75-
"@vitest/coverage-istanbul": "^0.34.1",
75+
"@vitest/coverage-istanbul": "^1.0.0",
7676
"@vue/compiler-sfc": "3.3.4",
7777
"dotenv-cli": "7.2.1",
7878
"eslint": "8.46.0",
@@ -84,7 +84,7 @@
8484
"tsup": "8.0.1",
8585
"typescript": "5.1.6",
8686
"vite": "5.0.10",
87-
"vitest": "0.34.1",
87+
"vitest": "1.1.0",
8888
"vue": "3.3.4",
8989
"vue-loader": "17.2.2",
9090
"webpack": "5.88.2"

0 commit comments

Comments
 (0)