This repository has been archived by the owner on Mar 31, 2024. It is now read-only.
forked from elastic/kibana
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
move test using tsc into an integration test to avoid timeout (elasti…
…c#32174) Fixes elastic#31828 To avoid a timeout we've seen fail 11 times since the end of January by moving the test into an integration test. The test starts up TypeScript, so it's clearly an integration test, and by moving it into an integration test it can have more time to run.
- Loading branch information
Spencer
committed
Feb 28, 2019
1 parent
dae372c
commit 5725b5c
Showing
4 changed files
with
37 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
36 changes: 36 additions & 0 deletions
36
src/core/public/injected_metadata/integration_tests/deep_freeze.test.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
/* | ||
* Licensed to Elasticsearch B.V. under one or more contributor | ||
* license agreements. See the NOTICE file distributed with | ||
* this work for additional information regarding copyright | ||
* ownership. Elasticsearch B.V. licenses this file to you under | ||
* the Apache License, Version 2.0 (the "License"); you may | ||
* not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, | ||
* software distributed under the License is distributed on an | ||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY | ||
* KIND, either express or implied. See the License for the | ||
* specific language governing permissions and limitations | ||
* under the License. | ||
*/ | ||
|
||
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(` | ||
"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. | ||
" | ||
`); | ||
}); |