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