mirror of
https://github.com/EnixCoda/Gitako.git
synced 2026-03-11 08:54:44 +00:00
test: move test files
This commit is contained in:
parent
5100c7b98d
commit
05ebb8d092
14 changed files with 28 additions and 22 deletions
|
|
@ -1,4 +1,4 @@
|
|||
import { expectToFind, expectToNotFind, sleep, waitForLegacyPJAXRedirect } from '../utils'
|
||||
import { expectToFind, expectToNotFind, sleep, waitForLegacyPJAXRedirect } from '../../utils'
|
||||
|
||||
describe(`in Gitako project page`, () => {
|
||||
beforeAll(() => page.goto('https://github.com/EnixCoda/Gitako/commits/develop'))
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
import { expectToFind, expectToNotFind, sleep, waitForLegacyPJAXRedirect } from '../utils'
|
||||
import { expectToFind, expectToNotFind, sleep, waitForLegacyPJAXRedirect } from '../../utils'
|
||||
|
||||
describe(`in Gitako project page`, () => {
|
||||
beforeAll(() => page.goto('https://github.com/EnixCoda/Gitako/tree/develop/src'))
|
||||
|
|
@ -4,8 +4,8 @@ import {
|
|||
patientClick,
|
||||
selectFileTreeItem,
|
||||
sleep,
|
||||
waitForLegacyPJAXRedirect,
|
||||
} from '../utils'
|
||||
waitForLegacyPJAXRedirect
|
||||
} from '../../utils'
|
||||
|
||||
describe(`in Gitako project page`, () => {
|
||||
beforeAll(() => page.goto('https://github.com/EnixCoda/Gitako/tree/develop/src'))
|
||||
|
|
@ -5,8 +5,8 @@ import {
|
|||
patientClick,
|
||||
selectFileTreeItem,
|
||||
sleep,
|
||||
waitForPJAXAPIRedirect,
|
||||
} from '../utils'
|
||||
waitForPJAXAPIRedirect
|
||||
} from '../../utils'
|
||||
|
||||
describe(`in Gitako project page`, () => {
|
||||
beforeAll(() => page.goto('https://github.com/EnixCoda/Gitako'))
|
||||
|
|
@ -4,7 +4,7 @@ import {
|
|||
expectToNotFind,
|
||||
scroll,
|
||||
selectFileTreeItem
|
||||
} from '../utils'
|
||||
} from '../../utils'
|
||||
|
||||
describe(`in Gitako project page`, () => {
|
||||
beforeAll(() => page.goto('https://github.com/EnixCoda/Gitako'))
|
||||
|
|
@ -1,8 +1,8 @@
|
|||
/**
|
||||
* Make sure some basic behaviors of puppeteer assertions
|
||||
* Confirm basic behaviors of puppeteer assertions
|
||||
*/
|
||||
|
||||
import { expectToFind, expectToNotFind } from '../utils'
|
||||
import { expectToFind, expectToNotFind } from '../../utils'
|
||||
|
||||
describe(`in random page`, () => {
|
||||
beforeAll(() => page.goto('https://google.com'))
|
||||
|
|
@ -3,7 +3,7 @@ import {
|
|||
selectFileTreeItem,
|
||||
sleep,
|
||||
waitForLegacyPJAXRedirect
|
||||
} from '../utils'
|
||||
} from '../../utils'
|
||||
|
||||
describe(`in Gitako project page`, () => {
|
||||
beforeAll(() => page.goto('https://github.com/EnixCoda/Gitako/tree/develop/src'))
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
import { expectToNotFind } from '../utils'
|
||||
import { expectToNotFind } from '../../utils'
|
||||
|
||||
describe(`in GitHub homepage`, () => {
|
||||
beforeAll(() => page.goto('https://github.com'))
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
import { expectToFind } from '../utils'
|
||||
import { expectToFind } from '../../utils'
|
||||
|
||||
describe(`in Gitako project page`, () => {
|
||||
beforeAll(() => page.goto('https://github.com/EnixCoda/Gitako/pull/71'))
|
||||
7
__tests__/jest.non-parallel.config.js
Normal file
7
__tests__/jest.non-parallel.config.js
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
const baseConfig = require('../jest.config')
|
||||
|
||||
module.exports = {
|
||||
...baseConfig,
|
||||
maxWorkers: 1,
|
||||
testMatch: [...baseConfig.testMatch, '**/__tests__/cases/non-parallel/*.ts?(x)'],
|
||||
}
|
||||
6
__tests__/jest.parallel.config.js
Normal file
6
__tests__/jest.parallel.config.js
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
const baseConfig = require('../jest.config')
|
||||
|
||||
module.exports = {
|
||||
...baseConfig,
|
||||
testMatch: [...baseConfig.testMatch, '**/__tests__/cases/parallel/*.ts?(x)'],
|
||||
}
|
||||
|
|
@ -141,7 +141,7 @@ module.exports = {
|
|||
// testLocationInResults: false,
|
||||
|
||||
// The glob patterns Jest uses to detect test files
|
||||
testMatch: ['**/__tests__/cases/*.ts?(x)', '**/?(*.)+(spec|test).ts?(x)'],
|
||||
testMatch: ['**/?(*.)+(spec|test).ts?(x)'],
|
||||
|
||||
// An array of regexp pattern strings that are matched against all test paths, matched tests are skipped
|
||||
testPathIgnorePatterns: ['/node_modules/', '.d.ts$', '<rootDir>/vscode-icons/'],
|
||||
|
|
|
|||
|
|
@ -1,7 +0,0 @@
|
|||
const baseConfig = require('./jest.config')
|
||||
|
||||
module.exports = {
|
||||
...baseConfig,
|
||||
maxWorkers: 1,
|
||||
testMatch: ['**/__tests__/non-parallel-cases/*.ts?(x)'],
|
||||
}
|
||||
|
|
@ -15,8 +15,8 @@
|
|||
"build": "VERSION=v$(node scripts/get-version.js) NODE_ENV=production webpack",
|
||||
"roll": "make release",
|
||||
"test": "yarn run test:parallel && yarn run test:non-parallel",
|
||||
"test:parallel": "NODE_ENV=test jest",
|
||||
"test:non-parallel": "NODE_ENV=test jest --config jest.non.parallel.config.js"
|
||||
"test:parallel": "NODE_ENV=test jest --config __tests__/jest.parallel.config.js",
|
||||
"test:non-parallel": "NODE_ENV=test jest --config __tests__/jest.non-parallel.config.js"
|
||||
},
|
||||
"dependencies": {
|
||||
"@primer/components": "^22.0.2",
|
||||
|
|
|
|||
Loading…
Reference in a new issue