Skip to content

Commit

Permalink
feat: initial library structure
Browse files Browse the repository at this point in the history
  • Loading branch information
Benjamin committed Feb 24, 2018
0 parents commit 6b2deb5
Show file tree
Hide file tree
Showing 9 changed files with 55 additions and 0 deletions.
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
.DS_Store
node_modules
package-lock.json
.nyc_output
11 changes: 11 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# puppeteer-to-istanbul

convert from puppeteer's coverage output to a format that can be used by istanbul reports

## Plan of Action

1. build a shim that lets us run arbitrary JavaScript code in puppeteer (
we can add this as a tool in the `./bin` folder).
2. write unit-tests for converting between puppeteer and v8 format.
3. write unit tests that verify outputting JavaScript files to disk.
4. profit.
Empty file added bin/.gitkeep
Empty file.
Empty file added index.js
Empty file.
Empty file added lib/.gitkeep
Empty file.
2 changes: 2 additions & 0 deletions lib/output-files.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
// output JavaScript bundled in puppeteer output to format
// that can be eaten by Istanbul.
1 change: 1 addition & 0 deletions lib/puppeteer-to-v8.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
// convert from puppeteer format to v8.
30 changes: 30 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
{
"name": "puppeteer-to-istanbul",
"version": "1.0.0",
"description": "convert from puppeteer's coverage output to a format that can be used by istanbul reports",
"main": "index.js",
"scripts": {
"test": "nyc --all mocha test/*.js"
},
"repository": {
"type": "git",
"url": "git+https://github.com/istanbuljs/puppeteer-to-istanbul.git"
},
"keywords": [
"istanbul",
"puppeteer",
"convert",
"coverage"
],
"author": "Hackillinois 2018, team Istanbul",
"license": "ISC",
"bugs": {
"url": "https://github.com/istanbuljs/puppeteer-to-istanbul/issues"
},
"homepage": "https://github.com/istanbuljs/puppeteer-to-istanbul#readme",
"devDependencies": {
"chai": "^4.1.2",
"mocha": "^5.0.1",
"nyc": "^11.4.1"
}
}
7 changes: 7 additions & 0 deletions test/puppeteer-to-v8.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
require('chai').should()

describe('puppeteer-to-v8', () => {
it('translates range data appropriately', () => {
'hello world'.should.equal('hello world')
})
})

0 comments on commit 6b2deb5

Please sign in to comment.