[core/deepFreeze] extend test timeout to 60 seconds (#32526) (#32535)

This commit is contained in:
Spencer 2019-03-06 08:47:17 -08:00 committed by GitHub
parent 6a7f81cc29
commit 68df4292b5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -21,16 +21,22 @@ import { resolve } from 'path';
import execa from 'execa';
it('types return values to prevent mutations in typescript', async () => {
await expect(
execa.stdout('tsc', ['--noEmit'], {
cwd: resolve(__dirname, '__fixtures__/frozen_object_mutation'),
})
).rejects.toThrowErrorMatchingInlineSnapshot(`
const MINUTE = 60 * 1000;
it(
'types return values to prevent mutations in typescript',
async () => {
await expect(
execa.stdout('tsc', ['--noEmit'], {
cwd: resolve(__dirname, '__fixtures__/frozen_object_mutation'),
})
).rejects.toThrowErrorMatchingInlineSnapshot(`
"Command failed: tsc --noEmit
index.ts(30,11): error TS2540: Cannot assign to 'baz' because it is a read-only property.
index.ts(40,10): error TS2540: Cannot assign to 'bar' because it is a read-only property.
"
`);
});
},
MINUTE
);