mirror of
https://gitee.com/docsifyjs/docsify.git
synced 2024-12-02 03:59:19 +08:00
62d756c447
BREAKING: The new project layout might break in some tooling setups. We've added an exports field to `package.json` to specify where statements like `import ... from 'docsify'` will import from, and left the `main` and `unpkg` fields as-is for backwards compatibility with the global <script> import method. Most people who use a non-module `<script>` tag to import Docsify will not notice a difference. Anyone else who is importing Docsify into a specilized build setup using `import` statements has a chance of being broken, so we've marked this as BREAKING.
31 lines
729 B
JavaScript
31 lines
729 B
JavaScript
import { TEST_HOST } from './test/config/server.js';
|
|
|
|
const sharedConfig = {
|
|
errorOnDeprecated: true,
|
|
globalSetup: './test/config/jest.setup.js',
|
|
globalTeardown: './test/config/jest.teardown.js',
|
|
resetModules: true,
|
|
restoreMocks: true,
|
|
setupFilesAfterEnv: ['<rootDir>/test/config/jest.setup-tests.js'],
|
|
testEnvironment: 'jsdom',
|
|
testURL: `${TEST_HOST}/_blank.html`,
|
|
};
|
|
|
|
export default {
|
|
transform: {},
|
|
projects: [
|
|
// Unit Tests
|
|
{
|
|
displayName: 'unit',
|
|
...sharedConfig,
|
|
testMatch: ['<rootDir>/test/unit/*.test.js'],
|
|
},
|
|
// Integration Tests
|
|
{
|
|
displayName: 'integration',
|
|
...sharedConfig,
|
|
testMatch: ['<rootDir>/test/integration/*.test.js'],
|
|
},
|
|
],
|
|
};
|