aboutsummaryrefslogtreecommitdiff
path: root/e2e
diff options
context:
space:
mode:
authorShin'ya UEOKA <ueokande@i-beam.org>2019-09-29 00:49:24 +0000
committerShin'ya UEOKA <ueokande@i-beam.org>2019-09-29 00:52:56 +0000
commit9f0bc5732823505c91ce6b5ba3aa8e4b60ac93f6 (patch)
treef3a75c0b41d8fe2b1e6ca730501e36cee5701705 /e2e
parent1b92be636008e9211f460479e246331ba4a1f8f1 (diff)
Remove deprecated assert
Diffstat (limited to 'e2e')
-rw-r--r--e2e/blacklist.test.ts4
-rw-r--r--e2e/clipboard.test.ts10
-rw-r--r--e2e/command_addbookmark.test.ts4
-rw-r--r--e2e/command_bdelete.test.ts18
-rw-r--r--e2e/command_buffer.test.ts20
-rw-r--r--e2e/command_open.test.ts12
-rw-r--r--e2e/command_quit.test.ts10
-rw-r--r--e2e/command_tabopen.test.ts24
-rw-r--r--e2e/command_winopen.test.ts24
-rw-r--r--e2e/completion.test.ts18
-rw-r--r--e2e/completion_buffers.test.ts22
-rw-r--r--e2e/completion_open.test.ts8
-rw-r--r--e2e/completion_set.test.ts6
-rw-r--r--e2e/console.test.ts18
-rw-r--r--e2e/follow.test.ts20
-rw-r--r--e2e/follow_properties.test.ts52
-rw-r--r--e2e/mark.test.ts18
-rw-r--r--e2e/navigate.test.ts34
-rw-r--r--e2e/options.test.ts10
-rw-r--r--e2e/options_form.test.ts16
-rw-r--r--e2e/repeat.test.ts8
-rw-r--r--e2e/scroll.test.ts10
-rw-r--r--e2e/tab.test.ts44
-rw-r--r--e2e/zoom.test.ts2
24 files changed, 206 insertions, 206 deletions
diff --git a/e2e/blacklist.test.ts b/e2e/blacklist.test.ts
index 03f2f90..8bf1bd8 100644
--- a/e2e/blacklist.test.ts
+++ b/e2e/blacklist.test.ts
@@ -49,7 +49,7 @@ describe("blacklist test", () => {
await page.sendKeys('j')
let scrollY = await page.getScrollY();
- assert.equal(scrollY, 0);
+ assert.strictEqual(scrollY, 0);
});
it('should enabled add-on if the URL is not in the blacklist', async () => {
@@ -57,6 +57,6 @@ describe("blacklist test", () => {
await page.sendKeys('j');
let scrollY = await page.getScrollY();
- assert.equal(scrollY, 64);
+ assert.strictEqual(scrollY, 64);
});
});
diff --git a/e2e/clipboard.test.ts b/e2e/clipboard.test.ts
index 0fd45f7..2b71ade 100644
--- a/e2e/clipboard.test.ts
+++ b/e2e/clipboard.test.ts
@@ -50,7 +50,7 @@ describe("clipboard test", () => {
await eventually(async() => {
let data = await clipboard.read();
- assert.equal(data, server.url('/#should_copy_url'));
+ assert.strictEqual(data, server.url('/#should_copy_url'));
});
});
@@ -62,7 +62,7 @@ describe("clipboard test", () => {
await eventually(async() => {
let tabs = await browser.tabs.query({ active: true });
- assert.equal(tabs[0].url, server.url('/#open_from_clipboard'));
+ assert.strictEqual(tabs[0].url, server.url('/#open_from_clipboard'));
});
});
@@ -74,7 +74,7 @@ describe("clipboard test", () => {
await eventually(async() => {
let tabs = await browser.tabs.query({});
- assert.deepEqual(tabs.map((t: any) => t.url), [
+ assert.deepStrictEqual(tabs.map((t: any) => t.url), [
server.url(),
server.url('/#open_to_new_tab'),
]);
@@ -89,7 +89,7 @@ describe("clipboard test", () => {
await eventually(async() => {
let tabs = await browser.tabs.query({ active: true });
- assert.equal(tabs[0].url, server.url('/google?q=an%20apple'));
+ assert.strictEqual(tabs[0].url, server.url('/google?q=an%20apple'));
});
});
@@ -101,7 +101,7 @@ describe("clipboard test", () => {
await eventually(async() => {
let tabs = await browser.tabs.query({});
- assert.deepEqual(tabs.map((t: any) => t.url), [
+ assert.deepStrictEqual(tabs.map((t: any) => t.url), [
server.url(),
server.url('/google?q=an%20apple'),
]);
diff --git a/e2e/command_addbookmark.test.ts b/e2e/command_addbookmark.test.ts
index 4fa30d8..bcc75ac 100644
--- a/e2e/command_addbookmark.test.ts
+++ b/e2e/command_addbookmark.test.ts
@@ -44,8 +44,8 @@ describe('addbookmark command test', () => {
await eventually(async() => {
var bookmarks = await browser.bookmarks.search({ title: 'how to be happy' });
- assert.equal(bookmarks.length, 1);
- assert.equal(bookmarks[0].url, server.url('/happy'));
+ assert.strictEqual(bookmarks.length, 1);
+ assert.strictEqual(bookmarks[0].url, server.url('/happy'));
});
});
});
diff --git a/e2e/command_bdelete.test.ts b/e2e/command_bdelete.test.ts
index 4c76c49..c96034d 100644
--- a/e2e/command_bdelete.test.ts
+++ b/e2e/command_bdelete.test.ts
@@ -43,7 +43,7 @@ describe('bdelete/bdeletes command test', () => {
await eventually(async() => {
let handles = await webdriver.getAllWindowHandles();
- assert.equal(handles.length, 5);
+ assert.strictEqual(handles.length, 5);
await webdriver.switchTo().window(handles[2]);
});
});
@@ -55,7 +55,7 @@ describe('bdelete/bdeletes command test', () => {
await eventually(async() => {
let tabs = await browser.tabs.query({});
- assert.deepEqual(tabs.map((t: any) => t.url), [
+ assert.deepStrictEqual(tabs.map((t: any) => t.url), [
server.url('/site1'),
server.url('/site2'),
server.url('/site3'),
@@ -71,7 +71,7 @@ describe('bdelete/bdeletes command test', () => {
await eventually(async() => {
let tabs = await browser.tabs.query({});
- assert.equal(tabs.length, 5);
+ assert.strictEqual(tabs.length, 5);
});
});
@@ -82,7 +82,7 @@ describe('bdelete/bdeletes command test', () => {
await eventually(async() => {
let text = await console.getErrorMessage();
- assert.equal(text, 'No matching buffer for xyz');
+ assert.strictEqual(text, 'No matching buffer for xyz');
});
});
@@ -93,7 +93,7 @@ describe('bdelete/bdeletes command test', () => {
await eventually(async() => {
let text = await console.getErrorMessage();
- assert.equal(text, 'More than one match for site');
+ assert.strictEqual(text, 'More than one match for site');
});
});
@@ -104,7 +104,7 @@ describe('bdelete/bdeletes command test', () => {
await eventually(async() => {
let tabs = await browser.tabs.query({});
- assert.deepEqual(tabs.map((t: any) => t.url), [
+ assert.deepStrictEqual(tabs.map((t: any) => t.url), [
server.url('/site1'),
server.url('/site2'),
server.url('/site3'),
@@ -120,7 +120,7 @@ describe('bdelete/bdeletes command test', () => {
await eventually(async() => {
let tabs = await browser.tabs.query({});
- assert.deepEqual(tabs.map((t: any) => t.url), [
+ assert.deepStrictEqual(tabs.map((t: any) => t.url), [
server.url('/site2'),
server.url('/site3'),
server.url('/site4'),
@@ -136,7 +136,7 @@ describe('bdelete/bdeletes command test', () => {
await eventually(async() => {
let tabs = await browser.tabs.query({});
- assert.deepEqual(tabs.map((t: any) => t.url), [
+ assert.deepStrictEqual(tabs.map((t: any) => t.url), [
server.url('/site1'),
server.url('/site2'),
server.url('/site3'),
@@ -151,7 +151,7 @@ describe('bdelete/bdeletes command test', () => {
await eventually(async() => {
let tabs = await browser.tabs.query({});
- assert.equal(tabs.length, 1);
+ assert.strictEqual(tabs.length, 1);
});
});
});
diff --git a/e2e/command_buffer.test.ts b/e2e/command_buffer.test.ts
index d1e9ccb..0036839 100644
--- a/e2e/command_buffer.test.ts
+++ b/e2e/command_buffer.test.ts
@@ -51,7 +51,7 @@ describe('buffer command test', () => {
await eventually(async() => {
let handles = await webdriver.getAllWindowHandles();
- assert.equal(handles.length, 5);
+ assert.strictEqual(handles.length, 5);
await webdriver.switchTo().window(handles[2]);
});
});
@@ -63,7 +63,7 @@ describe('buffer command test', () => {
await eventually(async() => {
let tabs = await browser.tabs.query({ active: true });
- assert.equal(tabs[0].index, 2);
+ assert.strictEqual(tabs[0].index, 2);
});
});
@@ -74,7 +74,7 @@ describe('buffer command test', () => {
await eventually(async() => {
let tabs = await browser.tabs.query({ active: true });
- assert.equal(tabs[0].index, 0);
+ assert.strictEqual(tabs[0].index, 0);
});
});
@@ -85,7 +85,7 @@ describe('buffer command test', () => {
await eventually(async() => {
let text = await console.getErrorMessage();
- assert.equal(text, 'tab 0 does not exist');
+ assert.strictEqual(text, 'tab 0 does not exist');
});
await (webdriver.switchTo() as any).parentFrame();
@@ -95,7 +95,7 @@ describe('buffer command test', () => {
await eventually(async() => {
let text = await console.getErrorMessage();
- assert.equal(text, 'tab 9 does not exist');
+ assert.strictEqual(text, 'tab 9 does not exist');
});
});
@@ -106,7 +106,7 @@ describe('buffer command test', () => {
await eventually(async() => {
let tabs = await browser.tabs.query({ active: true });
- assert.equal(tabs[0].index, 0);
+ assert.strictEqual(tabs[0].index, 0);
});
});
@@ -117,7 +117,7 @@ describe('buffer command test', () => {
await eventually(async() => {
let tabs = await browser.tabs.query({ active: true });
- assert.equal(tabs[0].index, 0);
+ assert.strictEqual(tabs[0].index, 0);
});
});
@@ -131,7 +131,7 @@ describe('buffer command test', () => {
await eventually(async() => {
let tabs = await browser.tabs.query({ active: true });
- assert.equal(tabs[0].index, 0);
+ assert.strictEqual(tabs[0].index, 0);
});
});
@@ -142,7 +142,7 @@ describe('buffer command test', () => {
await eventually(async() => {
let tabs = await browser.tabs.query({ active: true });
- assert.equal(tabs[0].index, 2);
+ assert.strictEqual(tabs[0].index, 2);
});
});
@@ -156,7 +156,7 @@ describe('buffer command test', () => {
await eventually(async() => {
let tabs = await browser.tabs.query({ active: true });
- assert.equal(tabs[0].index, 2);
+ assert.strictEqual(tabs[0].index, 2);
});
});
});
diff --git a/e2e/command_open.test.ts b/e2e/command_open.test.ts
index d45fa65..6fb2645 100644
--- a/e2e/command_open.test.ts
+++ b/e2e/command_open.test.ts
@@ -51,7 +51,7 @@ describe("open command test", () => {
await eventually(async() => {
let tabs = await browser.tabs.query({ active: true });
let url = new URL(tabs[0].url);
- assert.equal(url.href, server.url('/google?q=an%20apple'))
+ assert.strictEqual(url.href, server.url('/google?q=an%20apple'))
});
});
@@ -62,7 +62,7 @@ describe("open command test", () => {
await eventually(async() => {
let tabs = await browser.tabs.query({ active: true })
let url = new URL(tabs[0].url);
- assert.equal(url.href, server.url('/yahoo?q=an%20apple'))
+ assert.strictEqual(url.href, server.url('/yahoo?q=an%20apple'))
});
});
@@ -73,7 +73,7 @@ describe("open command test", () => {
await eventually(async() => {
let tabs = await browser.tabs.query({ active: true })
let url = new URL(tabs[0].url);
- assert.equal(url.href, server.url('/google?q='))
+ assert.strictEqual(url.href, server.url('/google?q='))
});
});
@@ -84,7 +84,7 @@ describe("open command test", () => {
await eventually(async() => {
let tabs = await browser.tabs.query({ active: true })
let url = new URL(tabs[0].url);
- assert.equal(url.href, server.url('/yahoo?q='))
+ assert.strictEqual(url.href, server.url('/yahoo?q='))
});
});
@@ -95,7 +95,7 @@ describe("open command test", () => {
await eventually(async() => {
let tabs = await browser.tabs.query({ active: true })
let url = new URL(tabs[0].url);
- assert.equal(url.href, 'http://example.com/')
+ assert.strictEqual(url.href, 'http://example.com/')
});
});
@@ -106,7 +106,7 @@ describe("open command test", () => {
await eventually(async() => {
let tabs = await browser.tabs.query({ active: true })
let url = new URL(tabs[0].url);
- assert.equal(url.href, 'https://example.com/')
+ assert.strictEqual(url.href, 'https://example.com/')
});
});
});
diff --git a/e2e/command_quit.test.ts b/e2e/command_quit.test.ts
index d187ccb..239d880 100644
--- a/e2e/command_quit.test.ts
+++ b/e2e/command_quit.test.ts
@@ -42,7 +42,7 @@ describe('quit/quitall command test', () => {
await eventually(async() => {
let handles = await webdriver.getAllWindowHandles();
- assert.equal(handles.length, 5);
+ assert.strictEqual(handles.length, 5);
await webdriver.switchTo().window(handles[2]);
});
});
@@ -54,7 +54,7 @@ describe('quit/quitall command test', () => {
await eventually(async() => {
let tabs = await browser.tabs.query({});
- assert.equal(tabs.length, 4)
+ assert.strictEqual(tabs.length, 4)
});
});
@@ -65,7 +65,7 @@ describe('quit/quitall command test', () => {
await eventually(async() => {
let tabs = await browser.tabs.query({});
- assert.equal(tabs.length, 4)
+ assert.strictEqual(tabs.length, 4)
});
});
@@ -76,7 +76,7 @@ describe('quit/quitall command test', () => {
await eventually(async() => {
let tabs = await browser.tabs.query({});
- assert.equal(tabs.length, 1)
+ assert.strictEqual(tabs.length, 1)
});
});
@@ -87,7 +87,7 @@ describe('quit/quitall command test', () => {
await eventually(async() => {
let tabs = await browser.tabs.query({});
- assert.equal(tabs.length, 1)
+ assert.strictEqual(tabs.length, 1)
});
});
});
diff --git a/e2e/command_tabopen.test.ts b/e2e/command_tabopen.test.ts
index bc5d13e..9d3da9a 100644
--- a/e2e/command_tabopen.test.ts
+++ b/e2e/command_tabopen.test.ts
@@ -54,9 +54,9 @@ describe("tabopen command test", () => {
await eventually(async() => {
let tabs = await browser.tabs.query({});
- assert.equal(tabs.length, 2);
+ assert.strictEqual(tabs.length, 2);
let url = new URL(tabs[1].url);
- assert.equal(url.href, server.url('/google?q=an%20apple') )
+ assert.strictEqual(url.href, server.url('/google?q=an%20apple') )
});
});
@@ -66,9 +66,9 @@ describe("tabopen command test", () => {
await eventually(async() => {
let tabs = await browser.tabs.query({});
- assert.equal(tabs.length, 2);
+ assert.strictEqual(tabs.length, 2);
let url = new URL(tabs[1].url);
- assert.equal(url.href, server.url('/yahoo?q=an%20apple'))
+ assert.strictEqual(url.href, server.url('/yahoo?q=an%20apple'))
});
});
@@ -78,9 +78,9 @@ describe("tabopen command test", () => {
await eventually(async() => {
let tabs = await browser.tabs.query({});
- assert.equal(tabs.length, 2);
+ assert.strictEqual(tabs.length, 2);
let url = new URL(tabs[1].url);
- assert.equal(url.href, server.url('/google?q='))
+ assert.strictEqual(url.href, server.url('/google?q='))
});
});
@@ -90,9 +90,9 @@ describe("tabopen command test", () => {
await eventually(async() => {
let tabs = await browser.tabs.query({});
- assert.equal(tabs.length, 2);
+ assert.strictEqual(tabs.length, 2);
let url = new URL(tabs[1].url);
- assert.equal(url.href, server.url('/yahoo?q='))
+ assert.strictEqual(url.href, server.url('/yahoo?q='))
});
});
@@ -102,9 +102,9 @@ describe("tabopen command test", () => {
await eventually(async() => {
let tabs = await browser.tabs.query({});
- assert.equal(tabs.length, 2);
+ assert.strictEqual(tabs.length, 2);
let url = new URL(tabs[1].url);
- assert.equal(url.href, 'http://example.com/')
+ assert.strictEqual(url.href, 'http://example.com/')
});
});
@@ -114,9 +114,9 @@ describe("tabopen command test", () => {
await eventually(async() => {
let tabs = await browser.tabs.query({});
- assert.equal(tabs.length, 2);
+ assert.strictEqual(tabs.length, 2);
let url = new URL(tabs[1].url);
- assert.equal(url.href, 'https://example.com/')
+ assert.strictEqual(url.href, 'https://example.com/')
});
});
});
diff --git a/e2e/command_winopen.test.ts b/e2e/command_winopen.test.ts
index fa52672..95a0b6a 100644
--- a/e2e/command_winopen.test.ts
+++ b/e2e/command_winopen.test.ts
@@ -53,11 +53,11 @@ describe("winopen command test", () => {
await eventually(async() => {
let wins = await browser.windows.getAll();
- assert.equal(wins.length, 2);
+ assert.strictEqual(wins.length, 2);
let tabs = await browser.tabs.query({ windowId: wins[1].id });
let url = new URL(tabs[0].url);
- assert.equal(url.href, server.url('/google?q=an%20apple'))
+ assert.strictEqual(url.href, server.url('/google?q=an%20apple'))
});
});
@@ -67,11 +67,11 @@ describe("winopen command test", () => {
await eventually(async() => {
let wins = await browser.windows.getAll();
- assert.equal(wins.length, 2);
+ assert.strictEqual(wins.length, 2);
let tabs = await browser.tabs.query({ windowId: wins[1].id });
let url = new URL(tabs[0].url);
- assert.equal(url.href, server.url('/yahoo?q=an%20apple'))
+ assert.strictEqual(url.href, server.url('/yahoo?q=an%20apple'))
});
});
@@ -81,11 +81,11 @@ describe("winopen command test", () => {
await eventually(async() => {
let wins = await browser.windows.getAll();
- assert.equal(wins.length, 2);
+ assert.strictEqual(wins.length, 2);
let tabs = await browser.tabs.query({ windowId: wins[1].id });
let url = new URL(tabs[0].url);
- assert.equal(url.href, server.url('/google?q='))
+ assert.strictEqual(url.href, server.url('/google?q='))
});
});
@@ -95,11 +95,11 @@ describe("winopen command test", () => {
await eventually(async() => {
let wins = await browser.windows.getAll();
- assert.equal(wins.length, 2);
+ assert.strictEqual(wins.length, 2);
let tabs = await browser.tabs.query({ windowId: wins[1].id });
let url = new URL(tabs[0].url);
- assert.equal(url.href, server.url('/yahoo?q='))
+ assert.strictEqual(url.href, server.url('/yahoo?q='))
});
});
@@ -109,11 +109,11 @@ describe("winopen command test", () => {
await eventually(async() => {
let wins = await browser.windows.getAll();
- assert.equal(wins.length, 2);
+ assert.strictEqual(wins.length, 2);
let tabs = await browser.tabs.query({ windowId: wins[1].id });
let url = new URL(tabs[0].url);
- assert.equal(url.href, 'http://example.com/')
+ assert.strictEqual(url.href, 'http://example.com/')
});
});
@@ -123,11 +123,11 @@ describe("winopen command test", () => {
await eventually(async() => {
let wins = await browser.windows.getAll();
- assert.equal(wins.length, 2);
+ assert.strictEqual(wins.length, 2);
let tabs = await browser.tabs.query({ windowId: wins[1].id });
let url = new URL(tabs[0].url);
- assert.equal(url.href, 'https://example.com/')
+ assert.strictEqual(url.href, 'https://example.com/')
});
});
});
diff --git a/e2e/completion.test.ts b/e2e/completion.test.ts
index 67577bf..28c1913 100644
--- a/e2e/completion.test.ts
+++ b/e2e/completion.test.ts
@@ -40,8 +40,8 @@ describe("general completion test", () => {
let console = await page.showConsole();
let items = await console.getCompletions();
- assert.equal(items.length, 10);
- assert.deepEqual(items[0], { type: 'title', text: 'Console Command' });
+ assert.strictEqual(items.length, 10);
+ assert.deepStrictEqual(items[0], { type: 'title', text: 'Console Command' });
assert.ok(items[1].text.startsWith('set'))
assert.ok(items[2].text.startsWith('open'))
assert.ok(items[3].text.startsWith('tabopen'))
@@ -52,8 +52,8 @@ describe("general completion test", () => {
await console.inputKeys('b');
let items = await console.getCompletions();
- assert.equal(items.length, 4);
- assert.deepEqual(items[0], { type: 'title', text: 'Console Command' });
+ assert.strictEqual(items.length, 4);
+ assert.deepStrictEqual(items[0], { type: 'title', text: 'Console Command' });
assert.ok(items[1].text.startsWith('buffer'))
assert.ok(items[2].text.startsWith('bdelete'))
assert.ok(items[3].text.startsWith('bdeletes'))
@@ -68,33 +68,33 @@ describe("general completion test", () => {
await console.inputKeys('b');
await eventually(async() => {
let items = await console.getCompletions();
- assert.equal(items.length, 4);
+ assert.strictEqual(items.length, 4);
});
await console.sendKeys(Key.TAB);
await eventually(async() => {
let items = await console.getCompletions();
assert.ok(items[1].highlight)
- assert.equal(await console.currentValue(), 'buffer');
+ assert.strictEqual(await console.currentValue(), 'buffer');
});
await console.sendKeys(Key.TAB, Key.TAB);
await eventually(async() => {
let items = await console.getCompletions();
assert.ok(items[3].highlight)
- assert.equal(await console.currentValue(), 'bdeletes');
+ assert.strictEqual(await console.currentValue(), 'bdeletes');
});
await console.sendKeys(Key.TAB);
await eventually(async() => {
- assert.equal(await console.currentValue(), 'b');
+ assert.strictEqual(await console.currentValue(), 'b');
});
await console.sendKeys(Key.SHIFT, Key.TAB);
await eventually(async() => {
let items = await console.getCompletions();
assert.ok(items[3].highlight)
- assert.equal(await console.currentValue(), 'bdeletes');
+ assert.strictEqual(await console.currentValue(), 'bdeletes');
});
});
});
diff --git a/e2e/completion_buffers.test.ts b/e2e/completion_buffers.test.ts
index 086da5d..b2d4201 100644
--- a/e2e/completion_buffers.test.ts
+++ b/e2e/completion_buffers.test.ts
@@ -60,7 +60,7 @@ describe("completion on buffer/bdelete/bdeletes", () => {
await eventually(async() => {
let handles = await webdriver.getAllWindowHandles();
- assert.equal(handles.length, 5);
+ assert.strictEqual(handles.length, 5);
await webdriver.switchTo().window(handles[2]);
});
@@ -73,8 +73,8 @@ describe("completion on buffer/bdelete/bdeletes", () => {
await eventually(async() => {
let items = await console.getCompletions();
- assert.equal(items.length, 6);
- assert.deepEqual(items[0], { type: 'title', text: 'Buffers' });
+ assert.strictEqual(items.length, 6);
+ assert.deepStrictEqual(items[0], { type: 'title', text: 'Buffers' });
assert.ok(items[1].text.startsWith('1:'));
assert.ok(items[2].text.startsWith('2:'));
assert.ok(items[3].text.startsWith('3:'));
@@ -92,7 +92,7 @@ describe("completion on buffer/bdelete/bdeletes", () => {
await eventually(async() => {
let items = await console.getCompletions();
- assert.deepEqual(items[0], { type: 'title', text: 'Buffers' });
+ assert.deepStrictEqual(items[0], { type: 'title', text: 'Buffers' });
assert.ok(items[1].text.startsWith('2:'));
assert.ok(items[1].text.includes('title_site2'));
assert.ok(items[1].text.includes(server.url('/site2')));
@@ -105,7 +105,7 @@ describe("completion on buffer/bdelete/bdeletes", () => {
await eventually(async() => {
let items = await console.getCompletions();
- assert.deepEqual(items[0], { type: 'title', text: 'Buffers' });
+ assert.deepStrictEqual(items[0], { type: 'title', text: 'Buffers' });
assert.ok(items[1].text.startsWith('2:'));
});
})
@@ -116,8 +116,8 @@ describe("completion on buffer/bdelete/bdeletes", () => {
await eventually(async() => {
let items = await console.getCompletions();
- assert.equal(items.length, 2);
- assert.deepEqual(items[0], { type: 'title', text: 'Buffers' });
+ assert.strictEqual(items.length, 2);
+ assert.deepStrictEqual(items[0], { type: 'title', text: 'Buffers' });
assert.ok(items[1].text.startsWith('2:'));
});
})
@@ -128,7 +128,7 @@ describe("completion on buffer/bdelete/bdeletes", () => {
await eventually(async() => {
let items = await console.getCompletions();
- assert.equal(items.length, 4);
+ assert.strictEqual(items.length, 4);
assert.ok(items[1].text.includes('site3'));
assert.ok(items[2].text.includes('site4'));
assert.ok(items[3].text.includes('site5'));
@@ -141,7 +141,7 @@ describe("completion on buffer/bdelete/bdeletes", () => {
await eventually(async() => {
let items = await console.getCompletions();
- assert.equal(items.length, 4);
+ assert.strictEqual(items.length, 4);
assert.ok(items[1].text.includes('site3'));
assert.ok(items[2].text.includes('site4'));
assert.ok(items[3].text.includes('site5'));
@@ -154,7 +154,7 @@ describe("completion on buffer/bdelete/bdeletes", () => {
await eventually(async() => {
let items = await console.getCompletions();
- assert.equal(items.length, 6);
+ assert.strictEqual(items.length, 6);
assert.ok(items[1].text.includes('site1'));
assert.ok(items[2].text.includes('site2'));
assert.ok(items[3].text.includes('site3'));
@@ -169,7 +169,7 @@ describe("completion on buffer/bdelete/bdeletes", () => {
await eventually(async() => {
let items = await console.getCompletions();
- assert.equal(items.length, 6);
+ assert.strictEqual(items.length, 6);
assert.ok(items[1].text.includes('site1'));
assert.ok(items[2].text.includes('site2'));
assert.ok(items[3].text.includes('site3'));
diff --git a/e2e/completion_open.test.ts b/e2e/completion_open.test.ts
index c475733..c957e2e 100644
--- a/e2e/completion_open.test.ts
+++ b/e2e/completion_open.test.ts
@@ -111,7 +111,7 @@ describe("completion on open/tabopen/winopen commands", () => {
await eventually(async() => {
let completions = await console.getCompletions();
let titles = completions.filter(x => x.type === 'title').map(x => x.text);
- assert.deepEqual(titles, ['Search Engines', 'Bookmarks', 'History'])
+ assert.deepStrictEqual(titles, ['Search Engines', 'Bookmarks', 'History'])
});
await console.close();
@@ -125,7 +125,7 @@ describe("completion on open/tabopen/winopen commands", () => {
await eventually(async() => {
let completions = await console.getCompletions();
let titles = completions.filter(x => x.type === 'title').map(x => x.text);
- assert.deepEqual(titles, ['Bookmarks', 'Search Engines', 'Search Engines'])
+ assert.deepStrictEqual(titles, ['Bookmarks', 'Search Engines', 'Search Engines'])
});
})
@@ -152,7 +152,7 @@ describe("completion on open/tabopen/winopen commands", () => {
await eventually(async() => {
let completions = await console.getCompletions();
let titles = completions.filter(x => x.type === 'title').map(x => x.text);
- assert.deepEqual(titles, ['Search Engines', 'Bookmarks', 'History'])
+ assert.deepStrictEqual(titles, ['Search Engines', 'Bookmarks', 'History'])
});
await console.close();
@@ -180,7 +180,7 @@ describe("completion on open/tabopen/winopen commands", () => {
await eventually(async() => {
let completions = await console.getCompletions();
let titles = completions.filter(x => x.type === 'title').map(x => x.text);
- assert.deepEqual(titles, ['Bookmarks', 'Search Engines', 'Search Engines'])
+ assert.deepStrictEqual(titles, ['Bookmarks', 'Search Engines', 'Search Engines'])
});
})
});
diff --git a/e2e/completion_set.test.ts b/e2e/completion_set.test.ts
index 2d9681f..2a14b2c 100644
--- a/e2e/completion_set.test.ts
+++ b/e2e/completion_set.test.ts
@@ -42,8 +42,8 @@ describe("completion on set commands", () => {
await eventually(async() => {
let items = await console.getCompletions();
- assert.equal(items.length, 5);
- assert.deepEqual(items[0], { type: 'title', text: 'Properties' });
+ assert.strictEqual(items.length, 5);
+ assert.deepStrictEqual(items[0], { type: 'title', text: 'Properties' });
assert.ok(items[1].text.startsWith('hintchars'))
assert.ok(items[2].text.startsWith('smoothscroll'))
assert.ok(items[3].text.startsWith('nosmoothscroll'))
@@ -57,7 +57,7 @@ describe("completion on set commands", () => {
await eventually(async() => {
let items = await console.getCompletions();
- assert.equal(items.length, 2);
+ assert.strictEqual(items.length, 2);
assert.ok(items[1].text.includes('nosmoothscroll'))
});
});
diff --git a/e2e/console.test.ts b/e2e/console.test.ts
index e11df10..583580a 100644
--- a/e2e/console.test.ts
+++ b/e2e/console.test.ts
@@ -37,54 +37,54 @@ describe("console test", () => {
it('open console with :', async() => {
await page.sendKeys(':');
let console = await page.getConsole();
- assert.equal(await console.currentValue(), '');
+ assert.strictEqual(await console.currentValue(), '');
});
it('open console with open command by o', async() => {
await page.sendKeys('o');
let console = await page.getConsole();
- assert.equal(await console.currentValue(), 'open ');
+ assert.strictEqual(await console.currentValue(), 'open ');
});
it('open console with open command and current URL by O', async() => {
await page.sendKeys(Key.SHIFT, 'o');
let console = await page.getConsole();
- assert.equal(await console.currentValue(), `open ${server.url()}`);
+ assert.strictEqual(await console.currentValue(), `open ${server.url()}`);
});
it('open console with tabopen command by t', async() => {
await page.sendKeys('t');
let console = await page.getConsole();
- assert.equal(await console.currentValue(), 'tabopen ');
+ assert.strictEqual(await console.currentValue(), 'tabopen ');
});
it('open console with tabopen command and current URL by T', async() => {
await page.sendKeys(Key.SHIFT, 't');
let console = await page.getConsole();
- assert.equal(await console.currentValue(), `tabopen ${server.url()}`);
+ assert.strictEqual(await console.currentValue(), `tabopen ${server.url()}`);
});
it('open console with winopen command by w', async() => {
await page.sendKeys('w');
let console = await page.getConsole();
- assert.equal(await console.currentValue(), `winopen `);
+ assert.strictEqual(await console.currentValue(), `winopen `);
});
it('open console with winopen command and current URL by W', async() => {
await page.sendKeys(Key.SHIFT, 'W');
let console = await page.getConsole();
- assert.equal(await console.currentValue(), `winopen ${server.url()}`);
+ assert.strictEqual(await console.currentValue(), `winopen ${server.url()}`);
});
it('open console with buffer command by b', async() => {
await page.sendKeys('b');
let console = await page.getConsole();
- assert.equal(await console.currentValue(), `buffer `);
+ assert.strictEqual(await console.currentValue(), `buffer `);
});
it('open console with addbookmark command with title by a', async() => {
await page.sendKeys('a');
let console = await page.getConsole();
- assert.equal(await console.currentValue(), `addbookmark Hello, world!`);
+ assert.strictEqual(await console.currentValue(), `addbookmark Hello, world!`);
});
});
diff --git a/e2e/follow.test.ts b/e2e/follow.test.ts
index a7ce0ed..fd741ef 100644
--- a/e2e/follow.test.ts
+++ b/e2e/follow.test.ts
@@ -141,7 +141,7 @@ describe('follow test', () => {
await page.sendKeys('a');
let tagName = await webdriver.executeScript(() => document.activeElement!!.tagName) as string;
- assert.equal(tagName.toLowerCase(), 'input');
+ assert.strictEqual(tagName.toLowerCase(), 'input');
});
it('should open a link by f', async () => {
@@ -152,7 +152,7 @@ describe('follow test', () => {
await eventually(async() => {
let hash = await webdriver.executeScript('return location.pathname');
- assert.equal(hash, '/hello');
+ assert.strictEqual(hash, '/hello');
});
});
@@ -163,7 +163,7 @@ describe('follow test', () => {
await page.sendKeys('a');
let tagName = await webdriver.executeScript(() => document.activeElement!!.tagName) as string;
- assert.equal(tagName.toLowerCase(), 'input');
+ assert.strictEqual(tagName.toLowerCase(), 'input');
});
it('should open a link to new tab by F', async () => {
@@ -174,9 +174,9 @@ describe('follow test', () => {
await eventually(async() => {
let tabs = await browser.tabs.query({});
- assert.equal(tabs.length, 2);
- assert.equal(new URL(tabs[1].url).pathname, '/hello');
- assert.equal(tabs[1].openerTabId, tabs[0].id);
+ assert.strictEqual(tabs.length, 2);
+ assert.strictEqual(new URL(tabs[1].url).pathname, '/hello');
+ assert.strictEqual(tabs[1].openerTabId, tabs[0].id);
});
});
@@ -185,7 +185,7 @@ describe('follow test', () => {
await page.sendKeys(Key.SHIFT, 'f');
let hints = await page.waitAndGetHints();
- assert.equal(hints.length, 3);
+ assert.strictEqual(hints.length, 3);
});
it('should shows hints only in viewport', async () => {
@@ -193,7 +193,7 @@ describe('follow test', () => {
await page.sendKeys(Key.SHIFT, 'f');
let hints = await page.waitAndGetHints();
- assert.equal(hints.length, 1);
+ assert.strictEqual(hints.length, 1);
});
it('should shows hints only in window of the frame', async () => {
@@ -202,7 +202,7 @@ describe('follow test', () => {
await webdriver.switchTo().frame(0);
let hints = await page.waitAndGetHints();
- assert.equal(hints.length, 1);
+ assert.strictEqual(hints.length, 1);
});
it('should shows hints only in the frame', async () => {
@@ -211,6 +211,6 @@ describe('follow test', () => {
await webdriver.switchTo().frame(0);
let hints = await page.waitAndGetHints();
- assert.equal(hints.length, 1);
+ assert.strictEqual(hints.length, 1);
});
});
diff --git a/e2e/follow_properties.test.ts b/e2e/follow_properties.test.ts
index b6254ae..75a1d77 100644
--- a/e2e/follow_properties.test.ts
+++ b/e2e/follow_properties.test.ts
@@ -75,22 +75,22 @@ describe('follow properties test', () => {
await page.sendKeys('f');
let hints = await page.waitAndGetHints();
- assert.equal(hints.length, 5);
+ assert.strictEqual(hints.length, 5);
- assert.equal(hints[0].text, 'J');
- assert.equal(hints[1].text, 'K');
- assert.equal(hints[2].text, 'JJ');
- assert.equal(hints[3].text, 'JK');
- assert.equal(hints[4].text, 'KJ');
+ assert.strictEqual(hints[0].text, 'J');
+ assert.strictEqual(hints[1].text, 'K');
+ assert.strictEqual(hints[2].text, 'JJ');
+ assert.strictEqual(hints[3].text, 'JK');
+ assert.strictEqual(hints[4].text, 'KJ');
await page.sendKeys('j');
hints = await page.waitAndGetHints();
- assert.equal(hints[0].displayed, true);
- assert.equal(hints[1].displayed, false);
- assert.equal(hints[2].displayed, true);
- assert.equal(hints[3].displayed, true);
- assert.equal(hints[4].displayed, false);
+ assert.strictEqual(hints[0].displayed, true);
+ assert.strictEqual(hints[1].displayed, false);
+ assert.strictEqual(hints[2].displayed, true);
+ assert.strictEqual(hints[3].displayed, true);
+ assert.strictEqual(hints[4].displayed, false);
});
it('should open tab in background by background:false', async () => {
@@ -100,8 +100,8 @@ describe('follow properties test', () => {
await eventually(async() => {
let tabs = await browser.tabs.query({});
- assert.equal(tabs[0].active, false);
- assert.equal(tabs[1].active, true);
+ assert.strictEqual(tabs[0].active, false);
+ assert.strictEqual(tabs[1].active, true);
});
});
@@ -112,8 +112,8 @@ describe('follow properties test', () => {
await eventually(async() => {
let tabs = await browser.tabs.query({});
- assert.equal(tabs[0].active, true);
- assert.equal(tabs[1].active, false);
+ assert.strictEqual(tabs[0].active, true);
+ assert.strictEqual(tabs[1].active, false);
});
});
@@ -124,19 +124,19 @@ describe('follow properties test', () => {
await page.sendKeys('f');
let hints = await page.waitAndGetHints();
- assert.equal(hints.length, 5);
- assert.equal(hints[0].text, 'A');
- assert.equal(hints[1].text, 'B');
- assert.equal(hints[2].text, 'C');
- assert.equal(hints[3].text, 'AA');
- assert.equal(hints[4].text, 'AB');
+ assert.strictEqual(hints.length, 5);
+ assert.strictEqual(hints[0].text, 'A');
+ assert.strictEqual(hints[1].text, 'B');
+ assert.strictEqual(hints[2].text, 'C');
+ assert.strictEqual(hints[3].text, 'AA');
+ assert.strictEqual(hints[4].text, 'AB');
await page.sendKeys('a');
hints = await page.waitAndGetHints();
- assert.equal(hints[0].displayed, true);
- assert.equal(hints[1].displayed, false);
- assert.equal(hints[2].displayed, false);
- assert.equal(hints[3].displayed, true);
- assert.equal(hints[4].displayed, true);
+ assert.strictEqual(hints[0].displayed, true);
+ assert.strictEqual(hints[1].displayed, false);
+ assert.strictEqual(hints[2].displayed, false);
+ assert.strictEqual(hints[3].displayed, true);
+ assert.strictEqual(hints[4].displayed, true);
});
});
diff --git a/e2e/mark.test.ts b/e2e/mark.test.ts
index ecc1035..57a8fa6 100644
--- a/e2e/mark.test.ts
+++ b/e2e/mark.test.ts
@@ -41,8 +41,8 @@ describe("mark test", () => {
await page.sendKeys('\'', 'a');
await eventually(async() => {
- assert.equal(await page.getScrollX(), 200);
- assert.equal(await page.getScrollY(), 200);
+ assert.strictEqual(await page.getScrollX(), 200);
+ assert.strictEqual(await page.getScrollY(), 200);
});
});
@@ -54,8 +54,8 @@ describe("mark test", () => {
await page.sendKeys('\'', 'A');
await eventually(async() => {
- assert.equal(await page.getScrollX(), 200);
- assert.equal(await page.getScrollY(), 200);
+ assert.strictEqual(await page.getScrollX(), 200);
+ assert.strictEqual(await page.getScrollY(), 200);
});
await browser.tabs.create({ url: server.url('/#second') });
@@ -65,10 +65,10 @@ describe("mark test", () => {
await eventually(async() => {
let tab = (await browser.tabs.query({ active: true }))[0];
let url = new URL(tab.url);
- assert.equal(url.hash, '#first');
+ assert.strictEqual(url.hash, '#first');
- assert.equal(await page.getScrollX(), 200);
- assert.equal(await page.getScrollY(), 200);
+ assert.strictEqual(await page.getScrollX(), 200);
+ assert.strictEqual(await page.getScrollY(), 200);
});
});
@@ -84,7 +84,7 @@ describe("mark test", () => {
let handles: string[];
await eventually(async() => {
handles = await webdriver.getAllWindowHandles();
- assert.equal(handles.length, 2);
+ assert.strictEqual(handles.length, 2);
});
await webdriver.switchTo().window(handles!![0]);
@@ -94,7 +94,7 @@ describe("mark test", () => {
await eventually(async() => {
let tab = (await browser.tabs.query({ active: true }))[0];
let url = new URL(tab.url);
- assert.equal(url.hash, '#first');
+ assert.strictEqual(url.hash, '#first');
});
});
});
diff --git a/e2e/navigate.test.ts b/e2e/navigate.test.ts
index 6f27ebd..8ee209b 100644
--- a/e2e/navigate.test.ts
+++ b/e2e/navigate.test.ts
@@ -84,7 +84,7 @@ describe("navigate test", () => {
await eventually(async() => {
let tab = (await browser.tabs.query({}))[0];
let url = new URL(tab.url);
- assert.equal(url.pathname, `/a/b/`)
+ assert.strictEqual(url.pathname, `/a/b/`)
});
});
@@ -95,8 +95,8 @@ describe("navigate test", () => {
await eventually(async() => {
let tab = (await browser.tabs.query({}))[0];
let url = new URL(tab.url);
- assert.equal(url.hash, '')
- assert.equal(url.pathname, `/a/b/c`)
+ assert.strictEqual(url.hash, '')
+ assert.strictEqual(url.pathname, `/a/b/c`)
});
});
@@ -107,7 +107,7 @@ describe("navigate test", () => {
await eventually(async() => {
let tab = (await browser.tabs.query({}))[0];
let url = new URL(tab.url);
- assert.equal(url.pathname, `/`)
+ assert.strictEqual(url.pathname, `/`)
});
});
@@ -119,7 +119,7 @@ describe("navigate test", () => {
await eventually(async() => {
let tab = (await browser.tabs.query({}))[0];
let url = new URL(tab.url);
- assert.equal(url.pathname, `/first`)
+ assert.strictEqual(url.pathname, `/first`)
});
page = await Page.currentContext(webdriver);
@@ -128,7 +128,7 @@ describe("navigate test", () => {
await eventually(async() => {
let tab = (await browser.tabs.query({}))[0];
let url = new URL(tab.url);
- assert.equal(url.pathname, `/second`)
+ assert.strictEqual(url.pathname, `/second`)
});
});
@@ -139,7 +139,7 @@ describe("navigate test", () => {
await eventually(async() => {
let tab = (await browser.tabs.query({}))[0];
let url = new URL(tab.url);
- assert.equal(url.pathname, '/pagenation-a/9');
+ assert.strictEqual(url.pathname, '/pagenation-a/9');
});
});
@@ -150,7 +150,7 @@ describe("navigate test", () => {
await eventually(async() => {
let tab = (await browser.tabs.query({}))[0];
let url = new URL(tab.url);
- assert.equal(url.pathname, '/pagenation-a/11');
+ assert.strictEqual(url.pathname, '/pagenation-a/11');
});
});
@@ -161,7 +161,7 @@ describe("navigate test", () => {
await eventually(async() => {
let tab = (await browser.tabs.query({}))[0];
let url = new URL(tab.url);
- assert.equal(url.pathname, '/pagenation-link/9');
+ assert.strictEqual(url.pathname, '/pagenation-link/9');
});
});
@@ -172,7 +172,7 @@ describe("navigate test", () => {
await eventually(async() => {
let tab = (await browser.tabs.query({}))[0];
let url = new URL(tab.url);
- assert.equal(url.pathname, '/pagenation-link/11');
+ assert.strictEqual(url.pathname, '/pagenation-link/11');
});
});
@@ -183,7 +183,7 @@ describe("navigate test", () => {
await eventually(async() => {
let tab = (await browser.tabs.query({}))[0];
let url = new URL(tab.url);
- assert.equal(url.hash, '#home');
+ assert.strictEqual(url.hash, '#home');
});
});
@@ -193,10 +193,10 @@ describe("navigate test", () => {
await eventually(async() => {
let tabs = await browser.tabs.query({});
- assert.equal(tabs.length, 2);
- assert.equal(new URL(tabs[0].url).hash, '');
- assert.equal(new URL(tabs[1].url).hash, '#home');
- assert.equal(tabs[1].active, true);
+ assert.strictEqual(tabs.length, 2);
+ assert.strictEqual(new URL(tabs[0].url).hash, '');
+ assert.strictEqual(new URL(tabs[1].url).hash, '#home');
+ assert.strictEqual(tabs[1].active, true);
});
});
@@ -222,7 +222,7 @@ describe("navigate test", () => {
await eventually(async() => {
let page = await Page.currentContext(webdriver);
- assert.equal(await page.getScrollX(), 500);
+ assert.strictEqual(await page.getScrollX(), 500);
});
});
@@ -248,7 +248,7 @@ describe("navigate test", () => {
await eventually(async() => {
let page = await Page.currentContext(webdriver);
- assert.equal(await page.getScrollY(), 0);
+ assert.strictEqual(await page.getScrollY(), 0);
});
});
});
diff --git a/e2e/options.test.ts b/e2e/options.test.ts
index 7cf1ecd..8d5023f 100644
--- a/e2e/options.test.ts
+++ b/e2e/options.test.ts
@@ -47,14 +47,14 @@ describe("options page", () => {
await jsonPage.updateSettings(`{ "blacklist": [ "https://example.com" ] }`)
let { settings } = await browser.storage.local.get('settings');
- assert.equal(settings.source, 'json')
- assert.equal(settings.json, '{ "blacklist": [ "https://example.com" ] } ')
+ assert.strictEqual(settings.source, 'json')
+ assert.strictEqual(settings.json, '{ "blacklist": [ "https://example.com" ] } ')
await jsonPage.updateSettings(`invalid json`);
settings = (await browser.storage.local.get('settings')).settings;
- assert.equal(settings.source, 'json')
- assert.equal(settings.json, '{ "blacklist": [ "https://example.com" ] } ')
+ assert.strictEqual(settings.source, 'json')
+ assert.strictEqual(settings.json, '{ "blacklist": [ "https://example.com" ] } ')
let message = await jsonPage.getErrorMessage();
assert.ok(message.startsWith('SyntaxError:'))
@@ -75,7 +75,7 @@ describe("options page", () => {
await eventually(async() => {
let y = await page.getScrollY();
- assert.equal(y, 640);
+ assert.strictEqual(y, 640);
});
})
});
diff --git a/e2e/options_form.test.ts b/e2e/options_form.test.ts
index 41d5f55..af53791 100644
--- a/e2e/options_form.test.ts
+++ b/e2e/options_form.test.ts
@@ -32,7 +32,7 @@ describe("options form page", () => {
await page.switchToForm();
let { settings } = await browser.storage.local.get('settings');
- assert.equal(settings.source, 'form')
+ assert.strictEqual(settings.source, 'form')
})
it('add blacklist', async () => {
@@ -43,25 +43,25 @@ describe("options form page", () => {
// assert default
let settings = (await browser.storage.local.get('settings')).settings;
- assert.deepEqual(settings.form.blacklist, [])
+ assert.deepStrictEqual(settings.form.blacklist, [])
// add blacklist items
await forms.addBlacklist();
await forms.setBlacklist(0, 'google.com')
settings = (await browser.storage.local.get('settings')).settings;
- assert.deepEqual(settings.form.blacklist, ['google.com'])
+ assert.deepStrictEqual(settings.form.blacklist, ['google.com'])
await forms.addBlacklist();
await forms.setBlacklist(1, 'yahoo.com')
settings = (await browser.storage.local.get('settings')).settings;
- assert.deepEqual(settings.form.blacklist, ['google.com', 'yahoo.com'])
+ assert.deepStrictEqual(settings.form.blacklist, ['google.com', 'yahoo.com'])
// delete first item
await forms.removeBlackList(0);
settings = (await browser.storage.local.get('settings')).settings;
- assert.deepEqual(settings.form.blacklist, ['yahoo.com'])
+ assert.deepStrictEqual(settings.form.blacklist, ['yahoo.com'])
});
it('add search engines', async () => {
@@ -70,17 +70,17 @@ describe("options form page", () => {
// assert default
let settings = (await browser.storage.local.get('settings')).settings;
- assert.deepEqual(settings.form.search.default, 'google');
+ assert.deepStrictEqual(settings.form.search.default, 'google');
// change default
await forms.setDefaultSearchEngine(2);
settings = (await browser.storage.local.get('settings')).settings;
- assert.deepEqual(settings.form.search.default, 'bing');
+ assert.deepStrictEqual(settings.form.search.default, 'bing');
await forms.addSearchEngine();
await forms.setSearchEngine(6, 'yippy', 'https://www.yippy.com/search?query={}');
settings = (await browser.storage.local.get('settings')).settings;
- assert.deepEqual(settings.form.search.engines[6], ['yippy', 'https://www.yippy.com/search?query={}']);
+ assert.deepStrictEqual(settings.form.search.engines[6], ['yippy', 'https://www.yippy.com/search?query={}']);
});
});
diff --git a/e2e/repeat.test.ts b/e2e/repeat.test.ts
index 9bd55fe..b62272f 100644
--- a/e2e/repeat.test.ts
+++ b/e2e/repeat.test.ts
@@ -37,7 +37,7 @@ describe("tab test", () => {
await eventually(async() => {
let current = await browser.tabs.query({ url: `*://*/newtab` });
- assert.equal(current.length, 1);
+ assert.strictEqual(current.length, 1);
});
page = await Page.currentContext(webdriver);
@@ -45,7 +45,7 @@ describe("tab test", () => {
await eventually(async() => {
let current = await browser.tabs.query({ url: `*://*/newtab` });
- assert.equal(current.length, 2);
+ assert.strictEqual(current.length, 2);
});
});
@@ -60,7 +60,7 @@ describe("tab test", () => {
await eventually(async() => {
let current = await browser.tabs.query({});
- assert.equal(current.length, before.length - 1);
+ assert.strictEqual(current.length, before.length - 1);
});
await browser.tabs.update(before[2].id, { active: true });
@@ -69,7 +69,7 @@ describe("tab test", () => {
await eventually(async() => {
let current = await browser.tabs.query({});
- assert.equal(current.length, before.length - 2);
+ assert.strictEqual(current.length, before.length - 2);
});
});
});
diff --git a/e2e/scroll.test.ts b/e2e/scroll.test.ts
index 1f3686a..5145265 100644
--- a/e2e/scroll.test.ts
+++ b/e2e/scroll.test.ts
@@ -40,7 +40,7 @@ describe("scroll test", () => {
await page.sendKeys('j');
let scrollY = await page.getScrollY();
- assert.equal(scrollY, 64);
+ assert.strictEqual(scrollY, 64);
});
it('scrolls down by k', async () => {
@@ -48,7 +48,7 @@ describe("scroll test", () => {
await page.sendKeys('k');
let scrollY = await page.getScrollY();
- assert.equal(scrollY, 136);
+ assert.strictEqual(scrollY, 136);
});
it('scrolls left by h', async () => {
@@ -56,7 +56,7 @@ describe("scroll test", () => {
await page.sendKeys('h');
let pageXOffset = await webdriver.executeScript(() => window.pageXOffset) as number;
- assert.equal(pageXOffset, 36);
+ assert.strictEqual(pageXOffset, 36);
});
it('scrolls left by l', async () => {
@@ -64,7 +64,7 @@ describe("scroll test", () => {
await page.sendKeys('l');
let pageXOffset = await webdriver.executeScript(() => window.pageXOffset) as number;
- assert.equal(pageXOffset, 164);
+ assert.strictEqual(pageXOffset, 164);
});
it('scrolls top by gg', async () => {
@@ -72,7 +72,7 @@ describe("scroll test", () => {
await page.sendKeys('g', 'g');
let scrollY = await page.getScrollY();
- assert.equal(scrollY, 0);
+ assert.strictEqual(scrollY, 0);
});
it('scrolls bottom by G', async () => {
diff --git a/e2e/tab.test.ts b/e2e/tab.test.ts
index 4911282..1a5dd5c 100644
--- a/e2e/tab.test.ts
+++ b/e2e/tab.test.ts
@@ -53,9 +53,9 @@ describe("tab test", () => {
await eventually(async() => {
let current = await browser.tabs.query({ windowId: win.id });
- assert.ok(current.length === tabs.length - 1);
- assert.ok(current[3].active);
- assert.ok(current[3].id === tabs[4].id);
+ assert.strictEqual(current.length, tabs.length - 1);
+ assert.strictEqual(current[3].active, true);
+ assert.strictEqual(current[3].id, tabs[4].id);
});
});
@@ -66,9 +66,9 @@ describe("tab test", () => {
await eventually(async() => {
let current = await browser.tabs.query({ windowId: win.id });
- assert.ok(current.length === tabs.length - 1);
- assert.ok(current[2].active);
- assert.ok(current[2].id === tabs[2].id);
+ assert.strictEqual(current.length, tabs.length - 1);
+ assert.strictEqual(current[2].active, true);
+ assert.strictEqual(current[2].id, tabs[2].id);
})
});
@@ -78,7 +78,7 @@ describe("tab test", () => {
await page.sendKeys('x', '$');
let current = await browser.tabs.query({ windowId: win.id });
- assert.ok(current.length === 2);
+ assert.strictEqual(current.length, 2);
});
it('duplicates tab by zd', async () => {
@@ -89,8 +89,8 @@ describe("tab test", () => {
await eventually(async() => {
let current = await browser.tabs.query({ windowId: win.id });
current.sort((t1: any, t2: any) => t1.index - t2.index);
- assert.ok(current.length === tabs.length + 1);
- assert.ok(current[0].url === current[1].url);
+ assert.strictEqual(current.length, tabs.length + 1);
+ assert.strictEqual(current[0].url, current[1].url);
});
});
@@ -100,7 +100,7 @@ describe("tab test", () => {
await page.sendKeys('z', 'p');
let current = await browser.tabs.query({ windowId: win.id });
- assert.ok(current[0].pinned);
+ assert.strictEqual(current[0].pinned, true);
});
it('selects previous tab by K', async () => {
@@ -109,7 +109,7 @@ describe("tab test", () => {
await page.sendKeys(Key.SHIFT, 'K');
let current = await browser.tabs.query({ windowId: win.id });
- assert.ok(current[1].active);
+ assert.strictEqual(current[1].active, true);
});
it('selects previous tab by K rotatory', async () => {
@@ -118,7 +118,7 @@ describe("tab test", () => {
await page.sendKeys(Key.SHIFT, 'K');
let current = await browser.tabs.query({ windowId: win.id });
- assert.ok(current[current.length - 1].active)
+ assert.strictEqual(current[current.length - 1].active, true)
});
it('selects next tab by J', async () => {
@@ -127,7 +127,7 @@ describe("tab test", () => {
await page.sendKeys(Key.SHIFT, 'J');
let current = await browser.tabs.query({ windowId: win.id });
- assert.ok(current[3].active);
+ assert.strictEqual(current[3].active, true);
});
it('selects previous tab by J rotatory', async () => {
@@ -136,7 +136,7 @@ describe("tab test", () => {
await page.sendKeys(Key.SHIFT, 'J');
let current = await browser.tabs.query({ windowId: win.id });
- assert.ok(current[0].active)
+ assert.strictEqual(current[0].active, true)
});
it('selects first tab by g0', async () => {
@@ -145,7 +145,7 @@ describe("tab test", () => {
await page.sendKeys('g', '0');
let current = await browser.tabs.query({ windowId: win.id });
- assert.ok(current[0].active)
+ assert.strictEqual(current[0].active, true)
});
it('selects last tab by g$', async () => {
@@ -154,7 +154,7 @@ describe("tab test", () => {
await page.sendKeys('g', '$');
let current = await browser.tabs.query({ windowId: win.id });
- assert.ok(current[current.length - 1].active)
+ assert.strictEqual(current[current.length - 1].active, true)
});
it('selects last selected tab by <C-6>', async () => {
@@ -165,7 +165,7 @@ describe("tab test", () => {
await page.sendKeys(Key.CONTROL, '6');
let current = await browser.tabs.query({ windowId: win.id });
- assert.ok(current[1].active)
+ assert.strictEqual(current[1].active, true)
});
// browser.sessions.getRecentlyClosed() sometime throws "An unexpected error occurred"
@@ -176,7 +176,7 @@ describe("tab test", () => {
await page.sendKeys('u');
let current = await browser.tabs.query({ windowId: win.id });
- assert.ok(current.length === tabs.length);
+ assert.strictEqual(current.length, tabs.length);
});
it('does not delete pinned tab by d', async () => {
@@ -185,7 +185,7 @@ describe("tab test", () => {
await page.sendKeys('d');
let current = await browser.tabs.query({ windowId: win.id });
- assert.ok(current.length === tabs.length);
+ assert.strictEqual(current.length, tabs.length);
});
it('deletes pinned tab by !d', async () => {
@@ -194,7 +194,7 @@ describe("tab test", () => {
await page.sendKeys('!', 'd');
let current = await browser.tabs.query({ windowId: win.id });
- assert.ok(current.length === tabs.length - 1);
+ assert.strictEqual(current.length, tabs.length - 1);
});
it('opens view-source by gf', async () => {
@@ -204,8 +204,8 @@ describe("tab test", () => {
await eventually(async() => {
let current = await browser.tabs.query({ windowId: win.id });
- assert.ok(current.length === tabs.length + 1);
- assert.ok(current[current.length - 1].url === `view-source:${server.url('/#0')}`);
+ assert.strictEqual(current.length, tabs.length + 1);
+ assert.strictEqual(current[current.length - 1].url, `view-source:${server.url('/#0')}`);
});
});
});
diff --git a/e2e/zoom.test.ts b/e2e/zoom.test.ts
index c1a9db9..396ddd2 100644
--- a/e2e/zoom.test.ts
+++ b/e2e/zoom.test.ts
@@ -58,7 +58,7 @@ describe("zoom test", () => {
await eventually(async() => {
let actual = await browser.tabs.getZoom(tab.id);
- assert.ok(actual === 1);
+ assert.strictEqual(actual, 1);
});
});
});