Skip to content

Latest commit

 

History

History
131 lines (87 loc) · 2.09 KB

no-length-as-slice-end.mjs.md

File metadata and controls

131 lines (87 loc) · 2.09 KB

Snapshot report for test/no-length-as-slice-end.mjs

The actual snapshot is saved in no-length-as-slice-end.mjs.snap.

Generated by AVA.

invalid(1): foo.slice(1, foo.length)

Input

`␊
  1 | foo.slice(1, foo.length)␊
`

Output

`␊
  1 | foo.slice(1)␊
`

Error 1/1

`␊
> 1 | foo.slice(1, foo.length)␊
    |              ^^^^^^^^^^ Passing \`….length\` as the \`end\` argument is unnecessary.␊
`

invalid(2): foo?.slice(1, foo.length)

Input

`␊
  1 | foo?.slice(1, foo.length)␊
`

Output

`␊
  1 | foo?.slice(1)␊
`

Error 1/1

`␊
> 1 | foo?.slice(1, foo.length)␊
    |               ^^^^^^^^^^ Passing \`….length\` as the \`end\` argument is unnecessary.␊
`

invalid(3): foo.slice(1, foo.length,)

Input

`␊
  1 | foo.slice(1, foo.length,)␊
`

Output

`␊
  1 | foo.slice(1,)␊
`

Error 1/1

`␊
> 1 | foo.slice(1, foo.length,)␊
    |              ^^^^^^^^^^ Passing \`….length\` as the \`end\` argument is unnecessary.␊
`

invalid(4): foo.slice(1, (( foo.length )))

Input

`␊
  1 | foo.slice(1, (( foo.length )))␊
`

Output

`␊
  1 | foo.slice(1)␊
`

Error 1/1

`␊
> 1 | foo.slice(1, (( foo.length )))␊
    |                 ^^^^^^^^^^ Passing \`….length\` as the \`end\` argument is unnecessary.␊
`

invalid(5): foo.slice(1, foo?.length)

Input

`␊
  1 | foo.slice(1, foo?.length)␊
`

Output

`␊
  1 | foo.slice(1)␊
`

Error 1/1

`␊
> 1 | foo.slice(1, foo?.length)␊
    |              ^^^^^^^^^^^ Passing \`….length\` as the \`end\` argument is unnecessary.␊
`

invalid(6): foo?.slice(1, foo?.length)

Input

`␊
  1 | foo?.slice(1, foo?.length)␊
`

Output

`␊
  1 | foo?.slice(1)␊
`

Error 1/1

`␊
> 1 | foo?.slice(1, foo?.length)␊
    |               ^^^^^^^^^^^ Passing \`….length\` as the \`end\` argument is unnecessary.␊
`