Ejemplo n.º 1
0
test('setting accessToken', t => {
  worker.setAccessToken('hello world');
  let state = worker.getAPIVariables();
  t.is(state.accessToken, 'hello world');
});
Ejemplo n.º 2
0
test('setting worker variables without accessToken', t => {
  worker.initAPIVariables({ apiUrl: 'b', githubUrl: 'c'});
  let state = worker.getAPIVariables();
  t.deepEqual(state, {accessToken: undefined, apiUrl: 'b', githubUrl: 'c'});
});