Skip to content

try jest #31

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Sep 25, 2022
Merged
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
18 changes: 18 additions & 0 deletions .github/workflows/run-tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: Run Tests

on: [push]

jobs:
build:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- name: Use Node.js 14
uses: actions/setup-node@v1
with:
node-version: 14
- run: npm i
- run: npm run test
- run: npm run test-integration
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -62,4 +62,5 @@ typings/

test/integration/node_modules
test/integration/output
coverage

6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ setTestHost(process.env.TEST_HOST);

Please send your config hooks!

If you feel that `codecept.conf.js` becomes too complicated and you know how to make it simpler,
If you feel that `codecept.conf.js` becomes too complicated, and you know how to make it simpler,
send a pull request with a config hook to solve your case.

Good ideas for config hooks:
Expand All @@ -174,8 +174,8 @@ To create a custom hook follow this rules.
2. Create a js module that exports a function.
3. Require `config` object from `codeceptjs` package.
4. Use `config.addHook((config) => {})` to set a hook for configuration
5. Add a test to `index_test.js`
6. Run `mocha index_test.js`
5. Add a test to `index.test.js`
6. Run `npm run test`

See current hooks as examples.

4 changes: 2 additions & 2 deletions hooks/setWindowSize.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ module.exports = function(width, height) {

// prepare window for a browser
cfg.helpers.Puppeteer.chrome = merge(
cfg.helpers.Puppeteer.chrome || {},
{ args, defaultViewport: null, } // disables viewport emualtion. See https://github.com/Codeception/CodeceptJS/issues/1209#issuecomment-522487793
cfg.helpers.Puppeteer.chrome || {},
{ args, defaultViewport: null, } // disables viewport emulation. See https://github.com/Codeception/CodeceptJS/issues/1209#issuecomment-522487793
);
}

Expand Down
Loading