Skip to content

Commit

Permalink
change window check in test
Browse files Browse the repository at this point in the history
  • Loading branch information
MattMcFarland committed Oct 19, 2017
1 parent 2e67342 commit b87202f
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 6 deletions.
5 changes: 5 additions & 0 deletions test/parray.test.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
const { parray } = init();

function init () {
if (typeof window !== 'undefined') {
return {
parray: window.PicoLambda.parray,
}
}
if (typeof window === 'undefined') {
const SpecReporter = require('jasmine-spec-reporter').SpecReporter;

Expand Down
8 changes: 5 additions & 3 deletions test/pcore.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@ const { pl } = init();


function init () {
if (typeof window !== 'undefined') {
return {
pl: window.PicoLambda,
}
}
if (typeof window === 'undefined') {
const SpecReporter = require('jasmine-spec-reporter').SpecReporter;

Expand All @@ -15,9 +20,6 @@ function init () {
pl: require('../src/index.js'),
}
}
return {
pl: window.PicoLambda,
}
}

describe('api: compose', () => {
Expand Down
8 changes: 5 additions & 3 deletions test/pstring.test.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
const { pstring } = init()

function init () {
if (typeof window !== 'undefined') {
return {
pstring: window.PicoLambda.pstring,
}
}
if (typeof window === 'undefined') {
const SpecReporter = require('jasmine-spec-reporter').SpecReporter;

Expand All @@ -14,9 +19,6 @@ function init () {
pstring: require('../src/index.js').pstring,
}
}
return {
pstring: window.PicoLambda.pstring,
}
}

describe('api: charAt', () => {
Expand Down

0 comments on commit b87202f

Please sign in to comment.