-
-
Notifications
You must be signed in to change notification settings - Fork 6.6k
Closed
Labels
Description
🐛 Bug Report
https://stackoverflow.com/questions/59090476/jest-with-angular8-and-node-13-segmentation-fault
Basic angular test fails on node 13.2 with Segmentation fault, but passes on node 13.1 and node 12
The test:
import {TestBed} from '@angular/core/testing';
import {HttpService} from './http.service';
describe('HttpService', () => {
let service: HttpService;
beforeEach(() => {
TestBed.configureTestingModule({
imports: [
],
providers: [
]
});
service = TestBed.get(HttpService);
});
it('should be created1', () => {
expect(service).toBeTruthy();
});
it('should be created2', () => {
expect(service).toBeTruthy();
});
it('should be created3', () => {
expect(service).toBeTruthy();
});
it('should be created4', () => {
expect(service).toBeTruthy();
});
it('should be created5', () => {
expect(service).toBeTruthy();
});
it('should be created6', () => {
expect(service).toBeTruthy();
});
it('should be created7', () => {
expect(service).toBeTruthy();
});
});
Class under tests:
import {Injectable} from '@angular/core';
@Injectable({
providedIn: 'root'
})
export class HttpService {
}
I also noticed that the test passes if there are 5 or less test cases, and always fails on the 6th test.
To Reproduce
I've been following Angular CLI: “ng test” with Jest in 3 minutes (v2) tutorial to set up jest tests with Angular 8.
Added test as stated above.
ng test fails with segmentation fault
Expected behavior
tests pass
Link to repl or repo (highly encouraged)
Github repo:
https://github.com/lesiak/node13-angular-jest
Github Workflow test matrix:
https://github.com/lesiak/node13-angular-jest/commit/beec00272208404ce9c490d6d4dab40fbb9e6125/checks?check_suite_id=334253246
envinfo
System:
OS: macOS Mojave 10.14.6
CPU: (12) x64 Intel(R) Core(TM) i7-9750H CPU @ 2.60GHz
Binaries:
Node: 13.2.0 - /usr/local/bin/node
npm: 6.13.1 - /usr/local/bin/npm
bxt and ssolders