Skip to content

Commit 533619b

Browse files
trivikrAllanZhengYP
authored andcommitted
test: fix unit tests of ModuleGenerator
1 parent 79e4373 commit 533619b

File tree

1 file changed

+3
-7
lines changed

1 file changed

+3
-7
lines changed

packages/package-generator/src/ModuleGenerator.spec.ts

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -118,11 +118,7 @@ describe("ModuleGenerator", () => {
118118
for (const [filename, contents] of generator) {
119119
if (filename === "README.md") {
120120
found = true;
121-
expect(contents).toBe(
122-
`# ${name}
123-
124-
${description}`
125-
);
121+
expect(contents).toBe(`# ${name}\n\n${description}\n`);
126122
}
127123
}
128124

@@ -136,7 +132,7 @@ ${description}`
136132
for (const [filename, contents] of generator) {
137133
if (filename === "README.md") {
138134
found = true;
139-
expect(contents).toBe(`# ${name}`);
135+
expect(contents).toBe(`# ${name}\n`);
140136
}
141137
}
142138

@@ -155,7 +151,7 @@ ${description}`
155151
for (const [filename, contents] of generator) {
156152
if (filename === "CHANGELOG.md") {
157153
generated = true;
158-
expect(contents).toBe("###changelog###");
154+
expect(contents).toBe(`###changelog###\n`);
159155
}
160156
}
161157
expect(generated).toBe(true);

0 commit comments

Comments
 (0)