mirror of
https://github.com/electron/electron.git
synced 2026-04-10 03:01:51 -04:00
chore: fix nan read/write patch
This commit is contained in:
@@ -140,73 +140,23 @@ index e6ad45737e2ac18da3fa936b1de618e7389933bc..025f5b66774c2f5fe0ccb98c91fc714d
|
||||
- t.equal(settergetter.prop2, 'setting a new value')
|
||||
})
|
||||
diff --git a/test/js/methodswithdata-test.js b/test/js/methodswithdata-test.js
|
||||
index 9f4fc5246f1ca3d8faadc9a72d49e14a6a190e32..bd84842a835af059fbe5a0d6d25dd01bb8909b6f 100644
|
||||
index 9f4fc5246f1ca3d8faadc9a72d49e14a6a190e32..795538510431fb3b633be37f916d4ce1955c808a 100644
|
||||
--- a/test/js/methodswithdata-test.js
|
||||
+++ b/test/js/methodswithdata-test.js
|
||||
@@ -4,35 +4,34 @@
|
||||
* Copyright (c) 2019 NAN contributors
|
||||
*
|
||||
* MIT License <https://github.com/nodejs/nan/blob/master/LICENSE.md>
|
||||
- ********************************************************************/
|
||||
-
|
||||
-const test = require('tap').test
|
||||
- , testRoot = require('path').resolve(__dirname, '..')
|
||||
- , bindings = require('bindings')({ module_root: testRoot, bindings: 'methodswithdata' })
|
||||
-
|
||||
-test('SetMethod with data', function (t) {
|
||||
- t.plan(1);
|
||||
- t.ok(bindings.testWithData());
|
||||
-});
|
||||
-
|
||||
-test('accessors with data', function (t) {
|
||||
@@ -16,7 +16,7 @@ test('SetMethod with data', function (t) {
|
||||
});
|
||||
|
||||
test('accessors with data', function (t) {
|
||||
- t.plan(7)
|
||||
- var settergetter = bindings.create()
|
||||
- t.equal(settergetter.prop1, 'this is property 1')
|
||||
- t.ok(settergetter.prop2 === '')
|
||||
- settergetter.prop2 = 'setting a value'
|
||||
- t.equal(settergetter.prop2, 'setting a value')
|
||||
- t.equal(settergetter.log(),
|
||||
- 'New()\n' +
|
||||
- 'Prop1:GETTER(this is property 1)\n' +
|
||||
- 'Prop2:GETTER()\n' +
|
||||
- 'Prop2:SETTER(setting a value)\n' +
|
||||
- 'Prop2:GETTER(setting a value)\n'
|
||||
- )
|
||||
- var derived = Object.create(settergetter)
|
||||
- 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')
|
||||
- })
|
||||
+ ********************************************************************/
|
||||
+
|
||||
+const test = require('tap').test
|
||||
+ , testRoot = require('path').resolve(__dirname, '..')
|
||||
+ , bindings = require('bindings')({ module_root: testRoot, bindings: 'methodswithdata' })
|
||||
+
|
||||
+test('SetMethod with data', function (t) {
|
||||
+ t.plan(1);
|
||||
+ t.ok(bindings.testWithData());
|
||||
+});
|
||||
+
|
||||
+test('accessors with data', function (t) {
|
||||
+ t.plan(6)
|
||||
+ var settergetter = bindings.create()
|
||||
+ t.equal(settergetter.prop1, 'this is property 1')
|
||||
+ t.ok(settergetter.prop2 === '')
|
||||
+ settergetter.prop2 = 'setting a value'
|
||||
+ t.equal(settergetter.prop2, 'setting a value')
|
||||
+ t.equal(settergetter.log(),
|
||||
+ 'New()\n' +
|
||||
+ 'Prop1:GETTER(this is property 1)\n' +
|
||||
+ 'Prop2:GETTER()\n' +
|
||||
+ 'Prop2:SETTER(setting a value)\n' +
|
||||
+ 'Prop2:GETTER(setting a value)\n'
|
||||
+ )
|
||||
+ var derived = Object.create(settergetter)
|
||||
+ t.equal(derived.prop1, 'this is property 1')
|
||||
+ derived.prop2 = 'setting a new value'
|
||||
+ t.equal(derived.prop2, 'setting a new value')
|
||||
+ })
|
||||
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
|
||||
|
||||
Reference in New Issue
Block a user