Skip to content

Commit 9a6df86

Browse files
committed
chore(vue): skip attachProps tests in node 8
1 parent 2cc811d commit 9a6df86

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

packages/vue/test/errorHandler.test.ts

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,11 @@ import { generateComponentTrace } from '../src/components';
44
import { attachErrorHandler } from '../src/errorhandler';
55
import { Operation, Options, ViewModel, Vue } from '../src/types';
66

7+
const CURRENT_NODE_VERSION = process.version.replace('v', '').split('.')[0];
8+
const describeSkipNode8 = CURRENT_NODE_VERSION === '8' ? xdescribe : describe;
9+
710
describe('attachErrorHandler', () => {
8-
describe('attachProps', () => {
11+
describeSkipNode8('attachProps', () => {
912
describe("given I don't want to `attachProps`", () => {
1013
test('no `propsData` is added to the metadata', () => {
1114
// arrange
@@ -402,7 +405,7 @@ const testHarness = ({
402405
warnHandlerSpy: expect(warnHandlerSpy),
403406
consoleErrorSpy: expect(consoleErrorSpy),
404407
errorToHaveBeenCaptured: () => {
405-
expect(captureExceptionSpy.mock.calls).toHaveLength(1);
408+
expect(captureExceptionSpy).toHaveBeenCalledTimes(1);
406409
const error = captureExceptionSpy.mock.calls[0][0];
407410
const contexts = captureExceptionSpy.mock.calls[0][2]._contexts;
408411

packages/vue/tsconfig.test.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
"compilerOptions": {
77
// should include all types from `./tsconfig.json` plus types for all test frameworks used
8-
"types": ["jest"]
8+
"types": ["jest", "node"]
99

1010
// other package-specific, test-specific options
1111
}

0 commit comments

Comments
 (0)