aboutsummaryrefslogtreecommitdiff
path: root/test/background/usecases/NavigateUseCase.test.ts
diff options
context:
space:
mode:
authorShin'ya Ueoka <ueokande@i-beam.org>2019-12-22 11:10:36 +0900
committerGitHub <noreply@github.com>2019-12-22 11:10:36 +0900
commitb1a6f374dca078dee2406ebe049715b826e37ca2 (patch)
tree5367c48648e2018f55f12d847baba94559e10040 /test/background/usecases/NavigateUseCase.test.ts
parentb2dcdedad729ff7087867da50e20578f9fc8fb29 (diff)
parentda72c2ddd916d79d134662e3985b53a4ac78af7a (diff)
Merge pull request #690 from ueokande/eslint-and-prettier
Eslint and prettier
Diffstat (limited to 'test/background/usecases/NavigateUseCase.test.ts')
-rw-r--r--test/background/usecases/NavigateUseCase.test.ts20
1 files changed, 10 insertions, 10 deletions
diff --git a/test/background/usecases/NavigateUseCase.test.ts b/test/background/usecases/NavigateUseCase.test.ts
index ecbf888..48a1c5b 100644
--- a/test/background/usecases/NavigateUseCase.test.ts
+++ b/test/background/usecases/NavigateUseCase.test.ts
@@ -16,10 +16,10 @@ describe('NavigateUseCase', () => {
describe('#openParent()', async () => {
it('opens parent directory of file', async() => {
- var stub = sinon.stub(tabPresenter, 'getCurrent');
+ const stub = sinon.stub(tabPresenter, 'getCurrent');
stub.returns(Promise.resolve({ url: 'https://google.com/fruits/yellow/banana' }))
- var mock = sinon.mock(tabPresenter);
+ const mock = sinon.mock(tabPresenter);
mock.expects('open').withArgs('https://google.com/fruits/yellow/');
await sut.openParent();
@@ -28,10 +28,10 @@ describe('NavigateUseCase', () => {
});
it('opens parent directory of directory', async() => {
- var stub = sinon.stub(tabPresenter, 'getCurrent');
+ const stub = sinon.stub(tabPresenter, 'getCurrent');
stub.returns(Promise.resolve({ url: 'https://google.com/fruits/yellow/' }))
- var mock = sinon.mock(tabPresenter);
+ const mock = sinon.mock(tabPresenter);
mock.expects('open').withArgs('https://google.com/fruits/');
await sut.openParent();
@@ -40,10 +40,10 @@ describe('NavigateUseCase', () => {
});
it('removes hash', async() => {
- var stub = sinon.stub(tabPresenter, 'getCurrent');
+ const stub = sinon.stub(tabPresenter, 'getCurrent');
stub.returns(Promise.resolve({ url: 'https://google.com/#top' }))
- var mock = sinon.mock(tabPresenter);
+ const mock = sinon.mock(tabPresenter);
mock.expects('open').withArgs('https://google.com/');
await sut.openParent();
@@ -52,10 +52,10 @@ describe('NavigateUseCase', () => {
});
it('removes search query', async() => {
- var stub = sinon.stub(tabPresenter, 'getCurrent');
+ const stub = sinon.stub(tabPresenter, 'getCurrent');
stub.returns(Promise.resolve({ url: 'https://google.com/search?q=apple' }))
- var mock = sinon.mock(tabPresenter);
+ const mock = sinon.mock(tabPresenter);
mock.expects('open').withArgs('https://google.com/search');
await sut.openParent();
@@ -66,12 +66,12 @@ describe('NavigateUseCase', () => {
describe('#openRoot()', () => {
it('opens root direectory', async() => {
- var stub = sinon.stub(tabPresenter, 'getCurrent');
+ const stub = sinon.stub(tabPresenter, 'getCurrent');
stub.returns(Promise.resolve({
url: 'https://google.com/seach?q=apple',
}))
- var mock = sinon.mock(tabPresenter);
+ const mock = sinon.mock(tabPresenter);
mock.expects('open').withArgs('https://google.com');
await sut.openRoot();