mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-08-11 05:58:56 +08:00
chore: remove jest; using playwright over whole project
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
import { describe, test, expect } from '@jest/globals';
|
||||
import { test, expect } from '@playwright/test';
|
||||
import { printer } from './../printer';
|
||||
const chalk = require('chalk');
|
||||
describe('printer', () => {
|
||||
test.describe('printer', () => {
|
||||
test('test debug', () => {
|
||||
expect(printer.debug('test debug')).toBe(
|
||||
chalk.green`debug` + chalk.white(' - test debug')
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { describe, test, expect } from '@jest/globals';
|
||||
import { test, expect } from '@playwright/test';
|
||||
import { isMobile } from '../get-is-mobile';
|
||||
|
||||
describe('get-is-mobile', () => {
|
||||
test.describe('get-is-mobile', () => {
|
||||
test('get-is-mobile', () => {
|
||||
expect(
|
||||
isMobile(
|
||||
|
||||
@@ -10,8 +10,8 @@
|
||||
".": "./dist/src/index.js"
|
||||
},
|
||||
"scripts": {
|
||||
"build": "tsc --project ./tsconfig.json",
|
||||
"test": "playwright test"
|
||||
"dev": "tsc --project ./tsconfig.json -w",
|
||||
"build": "tsc --project ./tsconfig.json"
|
||||
},
|
||||
"keywords": [],
|
||||
"author": "",
|
||||
|
||||
@@ -1,25 +0,0 @@
|
||||
import type { PlaywrightTestConfig } from '@playwright/test';
|
||||
|
||||
const config: PlaywrightTestConfig = {
|
||||
testDir: './tests',
|
||||
timeout: 30 * 1000,
|
||||
expect: {
|
||||
/**
|
||||
* Maximum time expect() should wait for the condition to be met.
|
||||
* For example in `await expect(locator).toHaveText();`
|
||||
*/
|
||||
timeout: 5000,
|
||||
},
|
||||
fullyParallel: true,
|
||||
forbidOnly: !!process.env.CI,
|
||||
retries: process.env.CI ? 2 : 0,
|
||||
workers: process.env.CI ? 1 : undefined,
|
||||
use: {
|
||||
actionTimeout: 0,
|
||||
|
||||
/* Collect trace when retrying the failed test. See https://playwright.dev/docs/trace-viewer */
|
||||
trace: 'on-first-retry',
|
||||
},
|
||||
};
|
||||
|
||||
export default config;
|
||||
Reference in New Issue
Block a user