Skip to content

Commit

Permalink
add old mode test
Browse files Browse the repository at this point in the history
  • Loading branch information
smagch committed Sep 25, 2013
1 parent 71576a3 commit ce63ad7
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
1 change: 1 addition & 0 deletions Makefile
Expand Up @@ -3,5 +3,6 @@ MOCHA = node_modules/.bin/mocha

test:
$(MOCHA)
SIMPLE_LRU_USE_OLD=true $(MOCHA)

.PHONY: test
11 changes: 10 additions & 1 deletion test/simple-lru.js
@@ -1,6 +1,15 @@

var expect = require('expect.js')
, SimpleLRU = require('../')
var SimpleLRU

if (process.env.SIMPLE_LRU_USE_OLD) {
var nativeCreate = Object.create
Object.create = undefined
SimpleLRU = require('../')
Object.create = nativeCreate
} else {
SimpleLRU = require('../')
}

describe('SimpleLRU', function () {

Expand Down

0 comments on commit ce63ad7

Please sign in to comment.