summaryrefslogtreecommitdiffhomepage
path: root/test
diff options
context:
space:
mode:
authorAndrej Mihajlov <and@mullvad.net>2018-06-14 16:04:45 +0200
committerAndrej Mihajlov <and@mullvad.net>2018-06-20 15:36:17 +0200
commit15e3ab04855dbe0bd7355b789756fa6b659e3047 (patch)
tree6d3a408ff00cd395f1d2831e0b6183c8ce94261a /test
parent4ccf1179e6135ec2f8137143d9454a100bccd65f (diff)
downloadmullvadvpn-15e3ab04855dbe0bd7355b789756fa6b659e3047.tar.xz
mullvadvpn-15e3ab04855dbe0bd7355b789756fa6b659e3047.zip
Rename IpcChain's require to expect
Diffstat (limited to 'test')
-rw-r--r--test/auth.spec.js4
-rw-r--r--test/autologin.spec.js4
-rw-r--r--test/helpers/IpcChain.js2
-rw-r--r--test/login.spec.js4
-rw-r--r--test/logout.spec.js4
5 files changed, 9 insertions, 9 deletions
diff --git a/test/auth.spec.js b/test/auth.spec.js
index 13afbd40ca..bdb890a59b 100644
--- a/test/auth.spec.js
+++ b/test/auth.spec.js
@@ -19,11 +19,11 @@ describe('authentication', () => {
};
const chain = new IpcChain(mockIpc);
- chain.require('authenticate').withInputValidation((secret) => {
+ chain.expect('authenticate').withInputValidation((secret) => {
expect(secret).to.equal(credentials.sharedSecret);
});
- chain.require('connect');
+ chain.expect('connect');
chain.onSuccessOrFailure(done);
diff --git a/test/autologin.spec.js b/test/autologin.spec.js
index a2633dac9d..06a6ec7eb3 100644
--- a/test/autologin.spec.js
+++ b/test/autologin.spec.js
@@ -11,9 +11,9 @@ describe('autologin', () => {
const randomAccountToken = '12345';
const chain = new IpcChain(mockIpc);
- chain.require('getAccount').withReturnValue(randomAccountToken);
+ chain.expect('getAccount').withReturnValue(randomAccountToken);
- chain.require('getAccountData').withInputValidation((num) => {
+ chain.expect('getAccountData').withInputValidation((num) => {
expect(num).to.equal(randomAccountToken);
});
diff --git a/test/helpers/IpcChain.js b/test/helpers/IpcChain.js
index cc96986cd3..efd80d39de 100644
--- a/test/helpers/IpcChain.js
+++ b/test/helpers/IpcChain.js
@@ -17,7 +17,7 @@ export class IpcChain {
this._aborted = false;
}
- require<R>(ipcCall: string): StepBuilder<R> {
+ expect<R>(ipcCall: string): StepBuilder<R> {
const builder = new StepBuilder(ipcCall);
this._expectedCalls.push(ipcCall);
this._addStep(builder);
diff --git a/test/login.spec.js b/test/login.spec.js
index 4e4dd5ab55..8c99111343 100644
--- a/test/login.spec.js
+++ b/test/login.spec.js
@@ -17,11 +17,11 @@ describe('Logging in', () => {
const { store, mockIpc, backend } = setupBackendAndStore();
const chain = new IpcChain(mockIpc);
- chain.require('getAccountData').withInputValidation((an) => {
+ chain.expect('getAccountData').withInputValidation((an) => {
expect(an).to.equal('123');
});
- chain.require('setAccount').withInputValidation((an) => {
+ chain.expect('setAccount').withInputValidation((an) => {
expect(an).to.equal('123');
});
diff --git a/test/logout.spec.js b/test/logout.spec.js
index 5037a834e9..4b0edaa0ca 100644
--- a/test/logout.spec.js
+++ b/test/logout.spec.js
@@ -16,10 +16,10 @@ describe('logging out', () => {
const { mockIpc, backend } = setupBackendAndStore();
const chain = new IpcChain(mockIpc);
- chain.require('setAccount').withInputValidation((num) => {
+ chain.expect('setAccount').withInputValidation((num) => {
expect(num).to.be.null;
});
- chain.require('disconnect');
+ chain.expect('disconnect');
chain.onSuccessOrFailure(done);
backend.logout();