Browse Source

chore: re-enable disabled test

David Sanders 9 months ago
parent
commit
e727c9e3b0
2 changed files with 22 additions and 3 deletions
  1. 21 0
      patches/nan/apply_allcan_read_write.patch
  2. 1 3
      script/nan-spec-runner.js

+ 21 - 0
patches/nan/apply_allcan_read_write.patch

@@ -139,3 +139,24 @@ index e6ad45737e2ac18da3fa936b1de618e7389933bc..025f5b66774c2f5fe0ccb98c91fc714d
    t.equal(derived.prop2, 'setting a new value')
 -  t.equal(settergetter.prop2, 'setting a new value')
  })
+diff --git a/test/js/methodswithdata-test.js b/test/js/methodswithdata-test.js
+index 9f4fc5246f1ca3d8faadc9a72d49e14a6a190e32..795538510431fb3b633be37f916d4ce1955c808a 100644
+--- a/test/js/methodswithdata-test.js
++++ b/test/js/methodswithdata-test.js
+@@ -16,7 +16,7 @@ test('SetMethod with data', function (t) {
+ });
+ 
+ test('accessors with data', function (t) {
+-    t.plan(7)
++    t.plan(6)
+     var settergetter = bindings.create()
+     t.equal(settergetter.prop1, 'this is property 1')
+     t.ok(settergetter.prop2 === '')
+@@ -33,6 +33,5 @@ test('accessors with data', function (t) {
+     t.equal(derived.prop1, 'this is property 1')
+     derived.prop2 = 'setting a new value'
+     t.equal(derived.prop2, 'setting a new value')
+-    t.equal(settergetter.prop2, 'setting a new value')
+   })
+   
+\ No newline at end of file

+ 1 - 3
script/nan-spec-runner.js

@@ -127,9 +127,7 @@ async function main () {
 
   const DISABLED_TESTS = new Set([
     'nannew-test.js',
-    'buffer-test.js',
-    // we can't patch this test because it uses CRLF line endings
-    'methodswithdata-test.js'
+    'buffer-test.js'
   ]);
   const testsToRun = fs.readdirSync(path.resolve(NAN_DIR, 'test', 'js'))
     .filter(test => !DISABLED_TESTS.has(test))