Skip to content

Commit 46934c5

Browse files
committed
Add test for linkNodeApiModules task
1 parent 00e8ab9 commit 46934c5

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
@@ -42,4 +42,20 @@ describe("Gradle tasks", () => {
4242
);
4343
});
4444
});
45+
46+
describe("linkNodeApiModules task", () => {
47+
it("should call the CLI to autolink", () => {
48+
const { status, stdout } = cp.spawnSync(
49+
"sh",
50+
["gradlew", "react-native-node-api:linkNodeApiModules"],
51+
{
52+
cwd: TEST_APP_ANDROID_PATH,
53+
encoding: "utf-8",
54+
},
55+
);
56+
57+
assert.equal(status, 0);
58+
assert.match(stdout, /Auto-linking Node-API modules/);
59+
});
60+
});
4561
});

0 commit comments

Comments
 (0)