Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

test: use the debug build of node-weak when necessary

  • Loading branch information...
commit d815bfa39634668447f52ee4d4b95ed77d8e262f 1 parent 643d1a9
@TooTallNate authored
Showing with 10 additions and 1 deletion.
  1. +10 −1 test/gc/node_modules/weak/lib/weak.js
View
11 test/gc/node_modules/weak/lib/weak.js
@@ -1,4 +1,13 @@
-var bindings = require('../build/Release/weakref.node')
+var bindings
+try {
+ bindings = require('../build/Release/weakref.node')
+} catch (e) {
+ if (e.code === 'MODULE_NOT_FOUND') {
+ bindings = require('../build/Debug/weakref.node')
+ } else {
+ throw e
+ }
+}
module.exports = bindings.create
// backwards-compat with node-weakref
Please sign in to comment.
Something went wrong with that request. Please try again.