Skip to content

Commit 5f102ed

Browse files
committed
initial
0 parents  commit 5f102ed

18 files changed

+9382
-0
lines changed

.babelrc

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"plugins": ["istanbul"]
3+
}

.circleci/config.yml

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
version: 2.1
2+
orbs:
3+
cypress: cypress-io/[email protected]
4+
jobs:
5+
release:
6+
executor: cypress/base-10
7+
steps:
8+
- attach_workspace:
9+
at: ~/
10+
- run: npm run semantic-release
11+
workflows:
12+
build:
13+
jobs:
14+
- cypress/run
15+
- release:
16+
requires:
17+
- cypress/run

.gitignore

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
node_modules/
2+
cypress/videos
3+
cypress/screenshots
4+
coverage/
5+
.nyc_output/
6+
dist/

LICENSE.md

+24
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
## MIT License
2+
3+
Copyright (c) 2019 Cypress.io https://www.cypress.io
4+
5+
Permission is hereby granted, free of charge, to any person
6+
obtaining a copy of this software and associated documentation
7+
files (the "Software"), to deal in the Software without
8+
restriction, including without limitation the rights to use,
9+
copy, modify, merge, publish, distribute, sublicense, and/or sell
10+
copies of the Software, and to permit persons to whom the
11+
Software is furnished to do so, subject to the following
12+
conditions:
13+
14+
The above copyright notice and this permission notice shall be
15+
included in all copies or substantial portions of the Software.
16+
17+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
18+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
19+
OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
20+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
21+
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
22+
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
23+
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
24+
OTHER DEALINGS IN THE SOFTWARE.

README.md

+22
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
# cypress-istanbul [![renovate-app badge][renovate-badge]][renovate-app]
2+
3+
> Saves the code coverage collected from instrumented code
4+
5+
## Install
6+
7+
```shell
8+
npm install -D cypress-istanbul
9+
```
10+
11+
and its peer dependencies
12+
13+
```shell
14+
npm install -D nyc istanbul-lib-coverage cypress
15+
```
16+
17+
## License
18+
19+
This project is licensed under the terms of the [MIT license](/LICENSE.md).
20+
21+
[renovate-badge]: https://img.shields.io/badge/renovate-app-blue.svg
22+
[renovate-app]: https://renovateapp.com/

cypress.json

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"baseUrl": "http://localhost:1234",
3+
"viewportHeight": 200,
4+
"viewportWidth": 200
5+
}

cypress/README.md

+22
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
# Cypress.io end-to-end tests
2+
3+
[Cypress.io](https://www.cypress.io) is an open source, MIT licensed end-to-end test runner
4+
5+
## Folder structure
6+
7+
These folders hold end-to-end tests and supporting files for the Cypress Test Runner.
8+
9+
- [fixtures](fixtures) holds optional JSON data for mocking, [read more](https://on.cypress.io/fixture)
10+
- [integration](integration) holds the actual test files, [read more](https://on.cypress.io/writing-and-organizing-tests)
11+
- [plugins](plugins) allow you to customize how tests are loaded, [read more](https://on.cypress.io/plugins)
12+
- [support](support) file runs before all tests and is a great place to write or load additional custom commands, [read more](https://on.cypress.io/writing-and-organizing-tests#Support-file)
13+
14+
## `cypress.json` file
15+
16+
You can configure project options in the [../cypress.json](../cypress.json) file, see [Cypress configuration doc](https://on.cypress.io/configuration).
17+
18+
## More information
19+
20+
- [https://github.com/cypress.io/cypress](https://github.com/cypress.io/cypress)
21+
- [https://docs.cypress.io/](https://docs.cypress.io/)
22+
- [Writing your first Cypress test](http://on.cypress.io/intro)

cypress/app.js

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
import { map } from 'lodash'
2+
3+
const list = [{ name: 'joe' }, { name: 'mary' }]
4+
const names = map(list, 'name')
5+
if (true) {
6+
console.log('just names', names)
7+
} else {
8+
console.error('never reached')
9+
}

cypress/fixtures/example.json

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"name": "Using fixtures to represent data",
3+
"email": "[email protected]",
4+
"body": "Fixtures are a great way to mock data for responses to routes"
5+
}

cypress/index.html

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
<body>
2+
<h2>Test page</h2>
3+
<p>Open the DevTools to see console messages</p>
4+
<script src="app.js"></script>
5+
</body>

cypress/integration/spec.js

+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
// enables intelligent code completion for Cypress commands
2+
// https://on.cypress.io/intelligent-code-completion
3+
/// <reference types="Cypress" />
4+
5+
context('Page test', () => {
6+
beforeEach(() => {
7+
cy.visit('/', {
8+
onBeforeLoad (win) {
9+
cy.spy(win.console, 'log').as('log')
10+
}
11+
})
12+
})
13+
14+
it('logs names', function () {
15+
cy.get('@log')
16+
.should('have.been.calledOnce')
17+
.should('have.been.calledWith', 'just names', ['joe', 'mary'])
18+
})
19+
})

cypress/plugins/index.js

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
module.exports = (on, config) => {
2+
on('task', require('../../task'))
3+
}

cypress/support/index.js

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
import '../../support'

0 commit comments

Comments
 (0)