Skip to content

Commit

Permalink
test: e2e test for "--base-href"
Browse files Browse the repository at this point in the history
  • Loading branch information
sumitarora authored and hansl committed Apr 1, 2017
1 parent 81403e8 commit 0df3f7c
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions tests/e2e/tests/test/e2e-baseurl.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,18 @@
import { ng, killAllProcesses } from '../../utils/process';
import { expectToFail } from '../../utils/utils';
import { ngServe } from '../../utils/project';
import { updateJsonFile } from '../../utils/project';

export default function () {
return Promise.resolve()
.then(() => ng('serve', '--port', '4400'))
.then(() => expectToFail(() => ng('e2e')))
.then(() => ng('e2e', '--no-serve', '--base-url=http://localhost:4400'))
.then(() => expectToFail(() => ng('e2e', '--no-serve')))
.then(() => updateJsonFile('.angular-cli.json', configJson => {
const app = configJson.defaults;
app.serve = { port: 4400 };
}))
.then(() => ngServe())
.then(() => expectToFail(() => ng('e2e', '--no-serve')))
.then(() => ng('e2e', '--no-serve', '--base-href=http://localhost:4400'))
.then(() => killAllProcesses(), (err: any) => {
killAllProcesses();
throw err;
Expand Down

0 comments on commit 0df3f7c

Please sign in to comment.