Skip to content

Commit

Permalink
prepare for npm publish
Browse files Browse the repository at this point in the history
  • Loading branch information
Gergely Nemeth committed Feb 18, 2020
1 parent 8dc4c19 commit f38cd65
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 2 deletions.
1 change: 1 addition & 0 deletions main.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
module.exports = require('./questions.json');
6 changes: 4 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,12 @@
"name": "1on1-questions",
"version": "1.0.0",
"description": "A list of 1 on 1 questions",
"main": "index.js",
"main": "main.js",
"scripts": {
"start": "npm run generate",
"generate": "node index.js"
"generate": "node index.js",
"test": "node test.js",
"prepublish": "npm test"
},
"author": "Vidal Graupera",
"license": "MIT"
Expand Down
8 changes: 8 additions & 0 deletions test.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
const assert = require('assert');

const questions = require('./');

const questionProps = Object.keys(questions[1]);

// making sure that the shape of the question object didn't change between patch and minors
assert.deepEqual(questionProps, [ 'id', 'question', 'category', 'created_at', 'updated_at' ])

0 comments on commit f38cd65

Please sign in to comment.