Skip to content

Commit

Permalink
feat: add globals module to allow access to all global objects via im…
Browse files Browse the repository at this point in the history
…port
  • Loading branch information
kollhof committed Jul 18, 2020
1 parent aedd97c commit ece54d5
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
"build": "run build:*",
"build:dir": "mkdir -p ./build/pkg/",
"build:fnk": "fnk --src ./src --out-dir build/pkg --ignore './src/**/*.test.fnk'",
"build:js": "cp ./src/this.js ./src/reflect.js ./src/nullish.js ./build/pkg/",
"build:js": "cp ./src/globals.js ./src/this.js ./src/reflect.js ./src/nullish.js ./build/pkg/",
"build:files": "cp ./package.json ./README.md ./LICENSE ./build/pkg/",
"test": "run jest",
"jest": "jest --verbose --runInBand --no-cache ",
Expand Down
1 change: 1 addition & 0 deletions src/globals.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
module.exports = globalThis;
1 change: 1 addition & 0 deletions src/nullish.test.fnk
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{describe, it, expect, to_equal} = import '@fink/jest'

{null, undefined} = import './nullish'
{JSON} = import './globals'


describe 'null, undefined', fn:
Expand Down
1 change: 1 addition & 0 deletions src/reflect.test.fnk
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
get_type, is_instance
} = import './reflect'

{String, Array} = import './globals'


describe 'reflect', fn:
Expand Down

0 comments on commit ece54d5

Please sign in to comment.