Skip to content

Commit 33e0aeb

Browse files
committed
fix: fix ports
1 parent 4ba409c commit 33e0aeb

File tree

2 files changed

+12
-13
lines changed

2 files changed

+12
-13
lines changed

src/index.spec.js

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,8 @@ export default tester(
4040
}
4141
</script>
4242
`,
43-
async test() {
44-
await this.page.goto('http://localhost:3000');
43+
async test({ port }) {
44+
await this.page.goto(`http://localhost:${port}`);
4545
await this.page.waitForSelector('.foo svg');
4646
await this.page.click('button');
4747

@@ -90,9 +90,9 @@ export default tester(
9090
}
9191
</script>
9292
`,
93-
async test() {
93+
async test({ port }) {
9494
const callbackPrefix = 'mermaidClick_';
95-
await this.page.goto('http://localhost:3000');
95+
await this.page.goto(`http://localhost:${port}`);
9696

9797
await this.page.waitForSelector(
9898
'.diagram a[*|href="https://google.com"] .node[id^=flowchart-A-]',
@@ -166,9 +166,9 @@ export default tester(
166166
}
167167
</script>
168168
`,
169-
async test() {
169+
async test({ port }) {
170170
const callbackPrefix = 'mermaidClick_'
171-
await this.page.goto('http://localhost:3000')
171+
await this.page.goto(`http://localhost:${port}`)
172172
await this.page.waitForSelector(
173173
'.diagram:first-child a[*|href="https://google.com"] .node[id^=flowchart-A-]',
174174
)
@@ -210,8 +210,8 @@ export default tester(
210210
}
211211
</script>
212212
`,
213-
async test() {
214-
await this.page.goto('http://localhost:3000');
213+
async test({ port }) {
214+
await this.page.goto(`http://localhost:${port}`);
215215

216216
await expect(this.page.locator('.foo')).toHaveText(
217217
'UnknownDiagramError: No diagram type detected matching given configuration for text: foo',
@@ -238,8 +238,8 @@ export default tester(
238238
}
239239
</script>
240240
`,
241-
async test() {
242-
await this.page.goto('http://localhost:3000');
241+
async test({ port }) {
242+
await this.page.goto(`http://localhost:${port}`);
243243

244244
expect(
245245
await this.page.locator('.foo svg').screenshot(),
@@ -266,8 +266,8 @@ export default tester(
266266
}
267267
</script>
268268
`,
269-
async test() {
270-
await this.page.goto('http://localhost:3000');
269+
async test({ port }) {
270+
await this.page.goto(`http://localhost:${port}`);
271271

272272
expect(
273273
await this.page.locator('.foo svg').screenshot(),

src/index.vue

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,6 @@ export default {
6262
}
6363
6464
this.$el.removeAttribute('data-processed');
65-
6665
mermaid.parseError = error => this.$emit('parse-error', error);
6766
6867
try {

0 commit comments

Comments
 (0)