Skip to content

Commit 5f5bcfe

Browse files
committed
fixup! refactor(apple): port 'privacy_manifest.rb' to JS
1 parent 9f12d97 commit 5f5bcfe

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

test/ios/privacyManifest.test.ts

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,9 @@ describe("generatePrivacyManifest()", macosOnly, () => {
1414
}
1515

1616
function readPrivacyManifest() {
17-
return fs.readFileSync("PrivacyInfo.xcprivacy", { encoding: "utf-8" });
17+
return fs
18+
.readFileSync("PrivacyInfo.xcprivacy", { encoding: "utf-8" })
19+
.split("\n");
1820
}
1921

2022
afterEach(() => {
@@ -24,13 +26,13 @@ describe("generatePrivacyManifest()", macosOnly, () => {
2426
it("generates a default manifest", async () => {
2527
await generatePrivacyManifest({});
2628

27-
deepEqual(readPrivacyManifest().split("\n"), DEFAULT_PRIVACY_MANIFEST);
29+
deepEqual(readPrivacyManifest(), DEFAULT_PRIVACY_MANIFEST);
2830
});
2931

3032
it("handles invalid configuration", async () => {
3133
await generatePrivacyManifest({ ios: { privacyManifest: "YES" } });
3234

33-
deepEqual(readPrivacyManifest().split("\n"), DEFAULT_PRIVACY_MANIFEST);
35+
deepEqual(readPrivacyManifest(), DEFAULT_PRIVACY_MANIFEST);
3436
});
3537

3638
it("appends to default manifest", async () => {
@@ -44,7 +46,7 @@ describe("generatePrivacyManifest()", macosOnly, () => {
4446
},
4547
});
4648

47-
deepEqual(readPrivacyManifest().split("\n"), [
49+
deepEqual(readPrivacyManifest(), [
4850
'<?xml version="1.0" encoding="UTF-8"?>',
4951
'<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">',
5052
'<plist version="1.0">',

0 commit comments

Comments
 (0)