mirror of
https://gitee.com/baidu/amis.git
synced 2024-12-02 03:58:07 +08:00
chore: 处理jest 28 => 29后snapshot格式不兼容问题 (#5487)
This commit is contained in:
parent
4ec44e10af
commit
41bdee3332
@ -85,6 +85,10 @@
|
|||||||
"testPathIgnorePatterns": [
|
"testPathIgnorePatterns": [
|
||||||
"/node_modules/",
|
"/node_modules/",
|
||||||
"/.rollup.cache/"
|
"/.rollup.cache/"
|
||||||
]
|
],
|
||||||
|
"snapshotFormat": {
|
||||||
|
"escapeString": false,
|
||||||
|
"printBasicPrototype": false
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
import {parse} from '../src/index';
|
import {parse} from '../src/index';
|
||||||
|
|
||||||
test('parser:simple', () => {
|
test('parser:simple', () => {
|
||||||
expect(
|
expect(
|
||||||
parse('expression result is ${a + b}', {
|
parse('expression result is ${a + b}', {
|
||||||
|
@ -94,7 +94,11 @@
|
|||||||
},
|
},
|
||||||
"setupFilesAfterEnv": [
|
"setupFilesAfterEnv": [
|
||||||
"<rootDir>/__tests__/jest.setup.js"
|
"<rootDir>/__tests__/jest.setup.js"
|
||||||
]
|
],
|
||||||
|
"snapshotFormat": {
|
||||||
|
"escapeString": false,
|
||||||
|
"printBasicPrototype": false
|
||||||
|
}
|
||||||
},
|
},
|
||||||
"gitHead": "37d23b4a8eb1c663bc38e8dd9040889ea1526ec4"
|
"gitHead": "37d23b4a8eb1c663bc38e8dd9040889ea1526ec4"
|
||||||
}
|
}
|
||||||
|
@ -29,6 +29,7 @@ import '../../src';
|
|||||||
import {clearStoresCache, render as amisRender} from '../../src';
|
import {clearStoresCache, render as amisRender} from '../../src';
|
||||||
import {makeEnv as makeEnvRaw, wait} from '../helper';
|
import {makeEnv as makeEnvRaw, wait} from '../helper';
|
||||||
import rows from '../mockData/rows';
|
import rows from '../mockData/rows';
|
||||||
|
import type {RenderOptions} from '../../src';
|
||||||
|
|
||||||
afterEach(() => {
|
afterEach(() => {
|
||||||
cleanup();
|
cleanup();
|
||||||
@ -37,7 +38,8 @@ afterEach(() => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
/** 避免updateLocation里的console.error */
|
/** 避免updateLocation里的console.error */
|
||||||
const makeEnv = args => makeEnvRaw({updateLocation: () => {}, ...args});
|
const makeEnv = (env?: Partial<RenderOptions>) =>
|
||||||
|
makeEnvRaw({updateLocation: () => {}, ...env});
|
||||||
|
|
||||||
async function fetcher(config: any) {
|
async function fetcher(config: any) {
|
||||||
return {
|
return {
|
||||||
|
@ -215,7 +215,11 @@
|
|||||||
"testPathIgnorePatterns": [
|
"testPathIgnorePatterns": [
|
||||||
"/node_modules/",
|
"/node_modules/",
|
||||||
"/.rollup.cache/"
|
"/.rollup.cache/"
|
||||||
]
|
],
|
||||||
|
"snapshotFormat": {
|
||||||
|
"escapeString": false,
|
||||||
|
"printBasicPrototype": false
|
||||||
|
}
|
||||||
},
|
},
|
||||||
"peerDependencies": {
|
"peerDependencies": {
|
||||||
"amis-core": "*",
|
"amis-core": "*",
|
||||||
|
Loading…
Reference in New Issue
Block a user