Skip to content

Commit b55f856

Browse files
committed
Add test for linkNodeApiModules task
1 parent 0250771 commit b55f856

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

packages/host/src/node/gradle.test.ts

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,4 +38,20 @@ describe("Gradle tasks", () => {
3838
);
3939
});
4040
});
41+
42+
describe("linkNodeApiModules task", () => {
43+
it("should call the CLI to autolink", () => {
44+
const { status, stdout } = cp.spawnSync(
45+
"sh",
46+
["gradlew", "react-native-node-api:linkNodeApiModules"],
47+
{
48+
cwd: TEST_APP_ANDROID_PATH,
49+
encoding: "utf-8",
50+
},
51+
);
52+
53+
assert.equal(status, 0);
54+
assert.match(stdout, /Auto-linking Node-API modules/);
55+
});
56+
});
4157
});

0 commit comments

Comments
 (0)