Skip to content

Commit

Permalink
Rename importCreateConfig to mockIsNodeCreateConfig
Browse files Browse the repository at this point in the history
  • Loading branch information
capellini committed Jan 28, 2019
1 parent 9db4827 commit 8141ae6
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions __tests__/config/create-config.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ describe('create configuration in non-production environment', () => {
tearDownTest(evalFunc, pwd)
})

const importCreateConfig = (isNode) => {
const mockIsNodeCreateConfig = (isNode) => {
mockIsNode = isNode

jest.resetModules()
Expand All @@ -28,7 +28,7 @@ describe('create configuration in non-production environment', () => {

describe('server-side', () => {
beforeEach(() => {
createConfig = importCreateConfig(true)
createConfig = mockIsNodeCreateConfig(true)
})

afterEach(() => {
Expand Down Expand Up @@ -152,7 +152,7 @@ describe('create configuration in non-production environment', () => {
// 2. isNode is truthy and process.browser is truthy
describe('client-side (isNode is falsy)', () => {
beforeEach(() => {
createConfig = importCreateConfig(false)
createConfig = mockIsNodeCreateConfig(false)
delete process.browser
})

Expand All @@ -165,7 +165,7 @@ describe('create configuration in non-production environment', () => {

describe('client-side (isNode is truthy and process.browser is truthy)', () => {
beforeEach(() => {
createConfig = importCreateConfig(true)
createConfig = mockIsNodeCreateConfig(true)
process.browser = true
})

Expand Down

0 comments on commit 8141ae6

Please sign in to comment.