Compare commits

...

2 Commits

Author SHA1 Message Date
David Sanders
e727c9e3b0 chore: re-enable disabled test 2024-07-17 14:39:11 -07:00
David Sanders
979e782744 build: preserve line endings in patches 2024-07-17 14:39:11 -07:00
3 changed files with 26 additions and 6 deletions

7
.gitattributes vendored
View File

@@ -1,8 +1,9 @@
# `git apply` and friends don't understand CRLF, even on windows. Force those
# files to be checked out with LF endings even if core.autocrlf is true.
*.patch text eol=lf
patches/**/.patches merge=union
# Patches must use the line endings of their target files. Otherwise they will
# fail to apply properly.
*.patch -eol
# Source code and markdown files should always use LF as line ending.
*.c text eol=lf
*.cc text eol=lf

View File

@@ -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

View File

@@ -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))