asenv
Version:
NODE_ENV accessor
31 lines (21 loc) • 520 B
JavaScript
/**
* Test case for isDevelopment.
* Runs with mocha.
*/
const isDevelopment = require('../lib/is_development.js')
const assert = require('assert')
describe('is-development', function () {
this.timeout(3000)
before(async () => {
})
after(async () => {
})
it('Is development', async () => {
process.env.NODE_ENV = 'development'
assert.ok(isDevelopment())
process.env.NODE_ENV = 'production'
assert.ok(!isDevelopment())
})
})
/* global describe, before, after, it */