-
Notifications
You must be signed in to change notification settings - Fork 73
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(sandbox): example of pubnub as a provider in notification service
MIGRATION CHANGE: migration-20210716062747- notification migration migration-20210501132806- notification migration gh-208
- Loading branch information
1 parent
f33ee62
commit fc32d60
Showing
1 changed file
with
31 additions
and
0 deletions.
There are no files selected for viewing
31 changes: 31 additions & 0 deletions
31
sandbox/pubnub-example/src/__tests__/acceptance/home-page.acceptance.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
import {Client} from '@loopback/testlab'; | ||
import {PubnubExampleApplication} from '../..'; | ||
import {setupApplication} from './test-helper'; | ||
|
||
describe('HomePage', () => { | ||
let app: PubnubExampleApplication; | ||
let client: Client; | ||
|
||
before('setupApplication', async () => { | ||
({app, client} = await setupApplication()); | ||
}); | ||
|
||
after(async () => { | ||
await app.stop(); | ||
}); | ||
|
||
it('exposes a default home page', async () => { | ||
await client | ||
.get('/') | ||
.expect(200) | ||
.expect('Content-Type', /text\/html/); | ||
}); | ||
|
||
it('exposes self-hosted explorer', async () => { | ||
await client | ||
.get('/explorer/') | ||
.expect(200) | ||
.expect('Content-Type', /text\/html/) | ||
.expect(/<title>LoopBack API Explorer/); | ||
}); | ||
}); |