The actual snapshot is saved in relative-url-style.mjs.snap
.
Generated by AVA.
1 | new URL("./foo", base)
Output
`␊
1 | new URL("foo", base)␊
`
Error 1/1
`␊
> 1 | new URL("./foo", base)␊
| ^^^^^^^ Remove the \`./\` prefix from the relative URL.␊
`
1 | new URL('./foo', base)
Output
`␊
1 | new URL('foo', base)␊
`
Error 1/1
`␊
> 1 | new URL('./foo', base)␊
| ^^^^^^^ Remove the \`./\` prefix from the relative URL.␊
`
1 | new URL("././a", base)
Output
`␊
1 | new URL("a", base)␊
`
Error 1/1
`␊
> 1 | new URL("././a", base)␊
| ^^^^^^^ Remove the \`./\` prefix from the relative URL.␊
`
1 | new URL(`./${foo}`, base)
Error 1/1
`␊
> 1 | new URL(\`./${foo}\`, base)␊
| ^^^^^^^^^^ Remove the \`./\` prefix from the relative URL.␊
␊
--------------------------------------------------------------------------------␊
Suggestion 1/1: Remove leading \`./\`.␊
1 | new URL(\`${foo}\`, base)␊
`
1 | new URL("./", "https://example.com/a/b/")
Output
`␊
1 | new URL("", "https://example.com/a/b/")␊
`
Error 1/1
`␊
> 1 | new URL("./", "https://example.com/a/b/")␊
| ^^^^ Remove the \`./\` prefix from the relative URL.␊
`
1 | new URL("foo", base)
Options
`␊
[␊
"always"␊
]␊
`
Output
`␊
1 | new URL("./foo", base)␊
`
Error 1/1
`␊
> 1 | new URL("foo", base)␊
| ^^^^^ Add a \`./\` prefix to the relative URL.␊
`
1 | new URL('foo', base)
Options
`␊
[␊
"always"␊
]␊
`
Output
`␊
1 | new URL('./foo', base)␊
`
Error 1/1
`␊
> 1 | new URL('foo', base)␊
| ^^^^^ Add a \`./\` prefix to the relative URL.␊
`
1 | new URL("", "https://example.com/a/b/")
Options
`␊
[␊
"always"␊
]␊
`
Output
`␊
1 | new URL("./", "https://example.com/a/b/")␊
`
Error 1/1
`␊
> 1 | new URL("", "https://example.com/a/b/")␊
| ^^ Add a \`./\` prefix to the relative URL.␊
`