Skip to content

Commit

Permalink
Fix the requirement of 100% coverage...
Browse files Browse the repository at this point in the history
  • Loading branch information
ChrisCinelli committed Nov 20, 2018
1 parent 072ac11 commit 9e022a6
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ var util = require('util')
var Yallist = require('yallist')

// use symbols if possible, otherwise just _props
var hasSymbol = typeof Symbol === 'function'
var hasSymbol = typeof Symbol === 'function' && !global._nodeLRUCacheForceNoSymbol
var makeSymbol
if (hasSymbol) {
makeSymbol = function (key) {
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
"scripts": {
"test": "tap test/*.js --100 -J",
"posttest": "standard test/*.js index.js",
"coveragerport": "tap --coverage-report=html",
"lintfix": "standard --fix test/*.js index.js",
"preversion": "npm test",
"postversion": "npm publish",
Expand Down
1 change: 0 additions & 1 deletion test/basic.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
var test = require('tap').test
if (global.NoSymbol) global.Symbol = false
var LRU = require('../')

test('basic', function (t) {
Expand Down
2 changes: 1 addition & 1 deletion test/no-symbol.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
// hacky way to test that it still works when Symbol is not there
global.NoSymbol = true
global._nodeLRUCacheForceNoSymbol = true
require('./basic.js')

0 comments on commit 9e022a6

Please sign in to comment.