Skip to content

Commit

Permalink
Prep testlab for publishing
Browse files Browse the repository at this point in the history
- Add unit test to ensure exported module works as expected
  • Loading branch information
simonhoibm committed Apr 26, 2017
1 parent aa45328 commit 9621bf1
Show file tree
Hide file tree
Showing 8 changed files with 50 additions and 0 deletions.
3 changes: 3 additions & 0 deletions packages/testlab/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
*.tgz
lib
package
6 changes: 6 additions & 0 deletions packages/testlab/.npmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
*.log
*.tgz
package
src
test
tsconfig.json
1 change: 1 addition & 0 deletions packages/testlab/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
module.exports = require('./lib/testlab');
10 changes: 10 additions & 0 deletions packages/testlab/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,18 @@
"version": "4.0.0-alpha.1",
"description": "A collection of test utilities we use to write LoopBack tests.",
"main": "index",
"scripts": {
"build": "tsc",
"clean": "rm *.tgz; rm -rf ./package",
"prepublish": "npm run build",
"test": "mocha",
"verify": "npm run clean && npm pack && tar xvzf *.tgz && tree package"
},
"author": "IBM",
"license": "MIT",
"devDependencies": {
"mocha": "^3.3.0"
},
"dependencies": {
"@types/sinon": "^1.16.34",
"@types/supertest": "^2.0.0",
Expand Down
File renamed without changes.
File renamed without changes.
8 changes: 8 additions & 0 deletions packages/testlab/test/testlab.acceptance.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
const should = require('should');
const testlab = require('..');

describe('testlab', () => {
it('exports expect interface', () => {
testlab.expect.should.be.type('function');
});
});
22 changes: 22 additions & 0 deletions packages/testlab/tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{
"compilerOptions": {
"baseUrl": ".",
"paths": {
"*": ["*"]
},
"emitDecoratorMetadata": true,
"experimentalDecorators": true,
"lib": ["es6", "dom"],
"module": "commonjs",
"moduleResolution": "node",
"outDir": "./lib",
"strictNullChecks": true,
"target": "es5"
},
"include": [
"src"
],
"exclude": [
"node_modules"
]
}

0 comments on commit 9621bf1

Please sign in to comment.