Skip to content

Commit

Permalink
test fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
filipesilva committed Feb 20, 2017
1 parent 46a7f8d commit 34acb94
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
2 changes: 1 addition & 1 deletion packages/@angular/cli/models/webpack-xi18n-config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,6 @@ export class XI18nWebpackConfig extends NgCliWebpackConfig {
this.extractOptions.i18nFormat);

this.config = webpackMerge([this.config, extractI18nConfig]);
return this.config();
return this.config;
}
}
2 changes: 1 addition & 1 deletion packages/@angular/cli/tasks/extract-i18n.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ export const Extracti18nTask = Task.extend({
i18nFormat: runTaskOptions.i18nFormat,
verbose: runTaskOptions.verbose,
progress: runTaskOptions.progress
}).config;
}).buildConfig();

const webpackCompiler = webpack(config);

Expand Down
7 changes: 5 additions & 2 deletions tests/e2e/tests/build/styles/imports.ts
Original file line number Diff line number Diff line change
@@ -1,15 +1,18 @@
import {
writeMultipleFiles,
deleteFile,
expectFileToMatch,
replaceInFile
} from '../../../utils/fs';
import { expectToFail } from '../../../utils/utils';
import { ng } from '../../../utils/process';
import { stripIndents } from 'common-tags';
import { updateJsonFile } from '../../../utils/project';
import { getGlobalVariable } from '../../../utils/env';

export default function () {
// Disable parts of it in webpack tests.
const ejected = getGlobalVariable('argv').eject;

const extensions = ['css', 'scss', 'less', 'styl'];
let promise = Promise.resolve();

Expand Down Expand Up @@ -57,7 +60,7 @@ export default function () {
.then(() => expectFileToMatch('dist/main.bundle.js',
/h1.*background:\s*#000+/))
// Also check imports work on ng test
.then(() => ng('test', '--single-run'))
.then(() => !ejected && ng('test', '--single-run'))
// change files back
.then(() => updateJsonFile('.angular-cli.json', configJson => {
const app = configJson['apps'][0];
Expand Down

0 comments on commit 34acb94

Please sign in to comment.