Skip to content
This repository has been archived by the owner on Sep 18, 2020. It is now read-only.

Commit

Permalink
Get the done callback
Browse files Browse the repository at this point in the history
  • Loading branch information
bergie committed Mar 8, 2018
1 parent c1a6fc8 commit d65f210
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions spec/provider.js
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ describe('BIG IoT Provider', () => {
city: 'Berlin',
};
});
it('should fail if activate is called before authentication', () => {
it('should fail if activate is called before authentication', (done) => {
prov.activate(off)
.then((result) => {
done(new Error('Unauthorized register passed'));
Expand All @@ -167,7 +167,7 @@ describe('BIG IoT Provider', () => {
done();
});
});
it('should fail if deactivate is called before authentication', () => {
it('should fail if deactivate is called before authentication', (done) => {
prov.deactivate(off)
.then((result) => {
done(new Error('Unauthorized register passed'));
Expand All @@ -178,9 +178,9 @@ describe('BIG IoT Provider', () => {
done();
});
});
it('should fail if activate is called before registering offer', async () => {
await prov.authenticate();
prov.activate(off)
it('should fail if activate is called before registering offer', (done) => {
prov.authenticate()
.then(() => prov.activate(off))
.then((result) => {
done(new Error('Unauthorized register passed'));
})
Expand All @@ -190,9 +190,9 @@ describe('BIG IoT Provider', () => {
done();
});
});
it('should fail if deactivate is called before registering offer', async () => {
await prov.authenticate();
prov.deactivate(off)
it('should fail if deactivate is called before registering offer', (done) => {
prov.authenticate()
.then(() => prov.deactivate(off))
.then((result) => {
done(new Error('Unauthorized register passed'));
})
Expand Down

0 comments on commit d65f210

Please sign in to comment.