mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-02-09 20:51:43 -06:00
Disable error sourcemaps during session test (#19504)
* Disable error sourcemaps during session test * Also disable during the exceptions-specific test
This commit is contained in:
parent
940175e23f
commit
6671485596
@ -53,6 +53,17 @@ namespace ts.server {
|
||||
return new TestSession(opts);
|
||||
}
|
||||
|
||||
// Disable sourcemap support for the duration of the test, as sourcemapping the errors generated during this test is slow and not something we care to test
|
||||
let oldPrepare: Function;
|
||||
before(() => {
|
||||
oldPrepare = (Error as any).prepareStackTrace;
|
||||
delete (Error as any).prepareStackTrace;
|
||||
});
|
||||
|
||||
after(() => {
|
||||
(Error as any).prepareStackTrace = oldPrepare;
|
||||
});
|
||||
|
||||
beforeEach(() => {
|
||||
session = createSession();
|
||||
session.send = (msg: protocol.Message) => {
|
||||
@ -387,6 +398,18 @@ namespace ts.server {
|
||||
});
|
||||
|
||||
describe("exceptions", () => {
|
||||
|
||||
// Disable sourcemap support for the duration of the test, as sourcemapping the errors generated during this test is slow and not something we care to test
|
||||
let oldPrepare: Function;
|
||||
before(() => {
|
||||
oldPrepare = (Error as any).prepareStackTrace;
|
||||
delete (Error as any).prepareStackTrace;
|
||||
});
|
||||
|
||||
after(() => {
|
||||
(Error as any).prepareStackTrace = oldPrepare;
|
||||
});
|
||||
|
||||
const command = "testhandler";
|
||||
class TestSession extends Session {
|
||||
lastSent: protocol.Message;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user