diff options
author | Shin'ya UEOKA <ueokande@i-beam.org> | 2019-09-27 10:02:12 +0000 |
---|---|---|
committer | Shin'ya UEOKA <ueokande@i-beam.org> | 2019-09-29 00:13:04 +0000 |
commit | 1b92be636008e9211f460479e246331ba4a1f8f1 (patch) | |
tree | 8dbba51444f5f52ad91f0357d2d7035298394452 /e2e/completion.test.ts | |
parent | 4a4b5e13031898440421cef7230c2742e6cd226a (diff) |
Use TestServer on e2e
Diffstat (limited to 'e2e/completion.test.ts')
-rw-r--r-- | e2e/completion.test.ts | 19 |
1 files changed, 1 insertions, 18 deletions
diff --git a/e2e/completion.test.ts b/e2e/completion.test.ts index 4884d21..67577bf 100644 --- a/e2e/completion.test.ts +++ b/e2e/completion.test.ts @@ -1,7 +1,5 @@ -import express from 'express'; import * as path from 'path'; import * as assert from 'assert'; -import * as http from 'http'; import eventually from './eventually'; import settings from './settings'; @@ -9,20 +7,7 @@ import { Builder, Lanthan } from 'lanthan'; import { WebDriver, Key } from 'selenium-webdriver'; import Page from './lib/Page'; -const newApp = () => { - let app = express(); - app.get('/', (_req, res) => { - res.send(`<!DOCTYPEhtml> -<html lang="en"> - <body>ok</body> -</html">`); - }); - return app; -}; - describe("general completion test", () => { - const port = 12321; - let http: http.Server; let lanthan: Lanthan; let webdriver: WebDriver; let browser: any; @@ -35,7 +20,6 @@ describe("general completion test", () => { .build(); webdriver = lanthan.getWebDriver(); browser = lanthan.getWebExtBrowser(); - http = newApp().listen(port); await browser.storage.local.set({ settings, @@ -43,14 +27,13 @@ describe("general completion test", () => { }); after(async() => { - http.close(); if (lanthan) { await lanthan.quit(); } }); beforeEach(async() => { - page = await Page.navigateTo(webdriver, `http://127.0.0.1:${port}`); + page = await Page.navigateTo(webdriver, 'about:blank'); }); it('should all commands on empty line', async() => { |