Skip to content

Commit caa6990

Browse files
test: give js-native-api tests consistent names
The convention for js-native-api/<test_name>: * <test_name>.c or <test_name>.cc has the entry point * The name of the target is <test_name>
1 parent d85929c commit caa6990

File tree

25 files changed

+24
-50
lines changed

25 files changed

+24
-50
lines changed

β€Žtest/js-native-api/2_function_arguments/binding.gyp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
{
22
"targets": [
33
{
4-
"target_name": "binding",
4+
"target_name": "2_function_arguments",
55
"sources": [
66
"../entry_point.c",
7-
"binding.c"
7+
"2_function_arguments.c"
88
]
99
}
1010
]
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
'use strict';
22
const common = require('../../common');
33
const assert = require('assert');
4-
const addon = require(`./build/${common.buildType}/binding`);
4+
const addon = require(`./build/${common.buildType}/2_function_arguments`);
55

66
assert.strictEqual(addon.add(3, 5), 8);

β€Žtest/js-native-api/3_callbacks/binding.gyp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
{
22
"targets": [
33
{
4-
"target_name": "binding",
4+
"target_name": "3_callbacks",
55
"sources": [
66
"../entry_point.c",
7-
"binding.c"
7+
"3_callbacks.c"
88
]
99
}
1010
]

β€Žtest/js-native-api/3_callbacks/test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
'use strict';
22
const common = require('../../common');
33
const assert = require('assert');
4-
const addon = require(`./build/${common.buildType}/binding`);
4+
const addon = require(`./build/${common.buildType}/3_callbacks`);
55

66
addon.RunCallback(function(msg) {
77
assert.strictEqual(msg, 'hello world');

β€Žtest/js-native-api/4_object_factory/binding.gyp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
{
22
"targets": [
33
{
4-
"target_name": "binding",
4+
"target_name": "4_object_factory",
55
"sources": [
66
"../entry_point.c",
7-
"binding.c"
7+
"4_object_factory.c"
88
]
99
}
1010
]

β€Žtest/js-native-api/4_object_factory/test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
'use strict';
22
const common = require('../../common');
33
const assert = require('assert');
4-
const addon = require(`./build/${common.buildType}/binding`);
4+
const addon = require(`./build/${common.buildType}/4_object_factory`);
55

66
const obj1 = addon('hello');
77
const obj2 = addon('world');

0 commit comments

Comments
Β (0)