Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

trailpack

Package Overview
Dependencies
Maintainers
1
Versions
40
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

trailpack - npm Package Compare versions

Comparing version 0.0.15 to 0.0.16

test/app.js

6

index.js

@@ -29,2 +29,5 @@ 'use strict'

}
if (!pack.config) {
pack.config = { }
}

@@ -35,4 +38,7 @@ this.app = app

_.merge(pack.config, _.get(pack.config.env, process.env.NODE_ENV))
_.defaultsDeep(this.app.config, _.omit(pack.config, 'trailpack'))
_.defaultsDeep(this.app.api, pack.api)
this.app.emit(`trailpack:${this.name}:constructed`)
}

@@ -39,0 +45,0 @@

6

package.json
{
"name": "trailpack",
"version": "0.0.15",
"version": "0.0.16",
"description": "Trailpack Interface. Trailpacks extend the functionality of the Trails framework.",

@@ -36,4 +36,6 @@ "main": "index.js",

"eslint-config-trails": "*",
"mocha": "^2.3.4"
"mocha": "^2.3.4",
"smokesignals": "0.0.8",
"trails": "0.0.16"
}
}
'use strict'
const assert = require('assert')
const TrailsApp = require('trails')
const TestPack = require('./pack')
const smokesignals = require('smokesignals')
describe('Trailpack', () => {
let pack
before(() => {
pack = new TestPack()
global.app = new TrailsApp(require('./app'))
return global.app.start().catch(global.app.stop)
})
after(() => {
return global.app.stop()
})
describe('#constructor', () => {
it('should construct without error', () => {
const pack = new smokesignals.Trailpack(global.app)
assert(pack)
})
it('should emit "constructed" event', done => {
global.app.after('trailpack:testpack:constructed').then(() => done() )
new TestPack(global.app)
})
})
describe('#name', () => {
it('should return module name', () => {
assert.equal(pack.name, 'test')
const pack = new TestPack(global.app)
assert.equal(pack.name, 'testpack')
})

@@ -24,2 +43,3 @@ })

// unload module!
/*
return pack.expunge(require.resolve('./pack'))

@@ -29,4 +49,5 @@ .then(() => {

})
*/
})
})
})
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc