-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into feat/run-in-worker
- Loading branch information
Showing
21 changed files
with
2,152 additions
and
2,666 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
module.exports = { | ||
hooks: { | ||
readPackage(pkg) { | ||
if (pkg.name === 'vue-template-compiler') | ||
pkg.dependencies.vue = '^2.6.0' | ||
return pkg | ||
}, | ||
}, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
# Vitest Demo | ||
|
||
Run `npm test` and change a test or source code to see HMR in action! | ||
|
||
Learn more at https://vitest.dev |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
{ | ||
"name": "@vitest/example-image-snapshot", | ||
"type": "module", | ||
"private": true, | ||
"license": "MIT", | ||
"main": "index.js", | ||
"scripts": { | ||
"test": "vitest", | ||
"test:ui": "vitest --ui", | ||
"test:run": "vitest run" | ||
}, | ||
"devDependencies": { | ||
"@vitest/ui": "latest", | ||
"jest-image-snapshot": "^4.5.1", | ||
"vite": "^2.9.9", | ||
"vitest": "latest" | ||
}, | ||
"stackblitz": { | ||
"startCommand": "npm run test:ui" | ||
} | ||
} |
Binary file added
BIN
+5.2 KB
..._snapshots__/basic-test-ts-test-basic-test-ts-2-m-22-mimage-snapshot-1-snap.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
import { readFileSync } from 'fs' | ||
import { expect, test } from 'vitest' | ||
import { toMatchImageSnapshot } from 'jest-image-snapshot' | ||
|
||
declare global { | ||
namespace jest { | ||
interface Matchers<R> { | ||
toMatchImageSnapshot(): R | ||
} | ||
} | ||
} | ||
|
||
expect.extend({ toMatchImageSnapshot }) | ||
|
||
test('image snapshot', () => { | ||
expect(readFileSync('./test/stubs/input-image.png')).toMatchImageSnapshot() | ||
}) |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
/// <reference types="vitest" /> | ||
|
||
// Configure Vitest (https://vitest.dev/config/) | ||
|
||
import { defineConfig } from 'vite' | ||
|
||
export default defineConfig({ | ||
test: { | ||
/* for example, use global to avoid globals imports (describe, test, expect): */ | ||
// globals: true, | ||
}, | ||
}) |
Oops, something went wrong.