fix(testing): fix jest on windows
This commit is contained in:
parent
b26e626251
commit
bd2cb49bfd
@ -9,6 +9,7 @@ import { from, Observable } from 'rxjs';
|
|||||||
import { map } from 'rxjs/operators';
|
import { map } from 'rxjs/operators';
|
||||||
|
|
||||||
import * as path from 'path';
|
import * as path from 'path';
|
||||||
|
import { getSystemPath } from '@angular-devkit/core';
|
||||||
|
|
||||||
try {
|
try {
|
||||||
require('dotenv').config();
|
require('dotenv').config();
|
||||||
@ -47,12 +48,15 @@ export default class JestBuilder implements Builder<JestBuilderOptions> {
|
|||||||
const options = builderConfig.options;
|
const options = builderConfig.options;
|
||||||
|
|
||||||
options.jestConfig = path.resolve(
|
options.jestConfig = path.resolve(
|
||||||
this.context.workspace.root,
|
getSystemPath(this.context.workspace.root),
|
||||||
options.jestConfig
|
options.jestConfig
|
||||||
);
|
);
|
||||||
|
|
||||||
const tsJestConfig = {
|
const tsJestConfig = {
|
||||||
tsConfig: path.resolve(this.context.workspace.root, options.tsConfig),
|
tsConfig: path.resolve(
|
||||||
|
getSystemPath(this.context.workspace.root),
|
||||||
|
options.tsConfig
|
||||||
|
),
|
||||||
// Typechecking wasn't done in Jest 23 but is done in 24. This makes errors a warning to amend the breaking change for now
|
// Typechecking wasn't done in Jest 23 but is done in 24. This makes errors a warning to amend the breaking change for now
|
||||||
// Remove for v8 to fail on type checking failure
|
// Remove for v8 to fail on type checking failure
|
||||||
diagnostics: {
|
diagnostics: {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user