diff --git a/package.json b/package.json index 50e427980..24ab668b5 100644 --- a/package.json +++ b/package.json @@ -85,6 +85,10 @@ "testPathIgnorePatterns": [ "/node_modules/", "/.rollup.cache/" - ] + ], + "snapshotFormat": { + "escapeString": false, + "printBasicPrototype": false + } } } diff --git a/packages/amis-formula/__tests__/parser.test.ts b/packages/amis-formula/__tests__/parser.test.ts index 0ee1e5732..fa87d1fbb 100644 --- a/packages/amis-formula/__tests__/parser.test.ts +++ b/packages/amis-formula/__tests__/parser.test.ts @@ -1,4 +1,5 @@ import {parse} from '../src/index'; + test('parser:simple', () => { expect( parse('expression result is ${a + b}', { diff --git a/packages/amis-formula/package.json b/packages/amis-formula/package.json index 9b951143d..688ba59cb 100644 --- a/packages/amis-formula/package.json +++ b/packages/amis-formula/package.json @@ -94,7 +94,11 @@ }, "setupFilesAfterEnv": [ "/__tests__/jest.setup.js" - ] + ], + "snapshotFormat": { + "escapeString": false, + "printBasicPrototype": false + } }, "gitHead": "37d23b4a8eb1c663bc38e8dd9040889ea1526ec4" } diff --git a/packages/amis/__tests__/renderers/CRUD.test.tsx b/packages/amis/__tests__/renderers/CRUD.test.tsx index 92a54426e..0e22e73a7 100644 --- a/packages/amis/__tests__/renderers/CRUD.test.tsx +++ b/packages/amis/__tests__/renderers/CRUD.test.tsx @@ -29,6 +29,7 @@ import '../../src'; import {clearStoresCache, render as amisRender} from '../../src'; import {makeEnv as makeEnvRaw, wait} from '../helper'; import rows from '../mockData/rows'; +import type {RenderOptions} from '../../src'; afterEach(() => { cleanup(); @@ -37,7 +38,8 @@ afterEach(() => { }); /** 避免updateLocation里的console.error */ -const makeEnv = args => makeEnvRaw({updateLocation: () => {}, ...args}); +const makeEnv = (env?: Partial) => + makeEnvRaw({updateLocation: () => {}, ...env}); async function fetcher(config: any) { return { diff --git a/packages/amis/package.json b/packages/amis/package.json index f4a1f5560..c74a7cf6f 100644 --- a/packages/amis/package.json +++ b/packages/amis/package.json @@ -215,7 +215,11 @@ "testPathIgnorePatterns": [ "/node_modules/", "/.rollup.cache/" - ] + ], + "snapshotFormat": { + "escapeString": false, + "printBasicPrototype": false + } }, "peerDependencies": { "amis-core": "*",