-
Notifications
You must be signed in to change notification settings - Fork 38
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
test: use @vitest/browser and setup test linting (#127)
- Loading branch information
1 parent
833bcc7
commit 26d3cae
Showing
8 changed files
with
78 additions
and
22 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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
import { beforeAll, expect, test } from 'vitest' | ||
import { configure, render } from '@solidjs/testing-library' | ||
|
||
import App from './App' | ||
|
||
beforeAll(() => { | ||
configure({ asyncUtilTimeout: 2000 }) | ||
}) | ||
|
||
test('Show login page', () => { | ||
const { findByText } = render(() => <App />) | ||
expect(findByText('Sign in with Google')).not.toBeFalsy() | ||
}) |
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,34 @@ | ||
import { configDefaults, defineWorkspace } from 'vitest/config' | ||
|
||
export default defineWorkspace([ | ||
{ | ||
extends: 'vite.config.ts', | ||
test: { | ||
include: [ | ||
'src/**/*.{test,spec}.ts', | ||
'src/**/*.unit.{test,spec}.ts', | ||
], | ||
exclude: [ | ||
...configDefaults.exclude, | ||
'**/*.browser.{test,spec}.{ts,tsx}', | ||
], | ||
name: 'unit', | ||
environment: 'node', | ||
setupFiles: './src/test/setup.ts', | ||
}, | ||
}, | ||
{ | ||
extends: 'vite.config.ts', | ||
test: { | ||
include: [ | ||
'**/*.browser.{test,spec}.{ts,tsx}', | ||
], | ||
browser: { | ||
provider: 'playwright', | ||
enabled: true, | ||
headless: true, | ||
name: 'chromium', | ||
}, | ||
}, | ||
}, | ||
]) |