Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion .eslintrc.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
{
"env": {
"browser": true,
"es2021": true
"es2021": true,
"jest": true
},
"globals": {
"page": true
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think there ought to be a way to only allow this page global in *.test.js files but I'm not sure what it is

},
"extends": [
"airbnb-base",
Expand Down
9 changes: 6 additions & 3 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,15 @@ jobs:
uses: actions/setup-node@v2
with:
node-version: ${{ env.NODE_VERSION }}

- name: Code Checkout
uses: actions/checkout@v2

- name: Install Dependencies
run: npm ci

- name: Code Linting
run: npm run lint

- name: Tests
run: npm run test
12 changes: 12 additions & 0 deletions integration/smoke.test.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
// These tests assume that the server is running locally on port 3000 and the
// test data is unchanged.
describe.skip('basic integration', () => {
it('loads pages', async () => {
await page.goto('http://localhost:3000');
await expect(page.title()).resolves.toEqual('Latest bookmarks | Postmarks');
await page.locator('a[href="/bookmark/1"]').click();
await page.waitForNavigation();
await expect(page.title()).resolves.toEqual('Postmarks - Getting Started | Postmarks');
expect(await page.content()).toMatch('Some notes on setup and acknowledgements');
});
});
4 changes: 4 additions & 0 deletions jest.config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"preset": "jest-puppeteer",
"transform": {}
}
Loading