Skip to content

Latest commit

 

History

History
155 lines (109 loc) · 2.49 KB

relative-url-style.mjs.md

File metadata and controls

155 lines (109 loc) · 2.49 KB

Snapshot report for test/relative-url-style.mjs

The actual snapshot is saved in relative-url-style.mjs.snap.

Generated by AVA.

Invalid #1

  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.␊
`

Invalid #2

  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.␊
`

Invalid #3

  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.␊
`

Invalid #4

  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)␊
`

Invalid #5

  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.␊
`

Invalid #1

  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.␊
`

Invalid #2

  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.␊
`

Invalid #3

  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.␊
`