Simplify test example syntax

This commit is contained in:
Max Goodhart
2020-06-20 20:50:32 -07:00
parent 767d85858d
commit bf4bf1a595

View File

@@ -1,44 +1,39 @@
import { boxesFromViewURLMap } from './geometry' import { boxesFromViewURLMap } from './geometry'
const box1 = ` function example([text]) {
return text
.replace(/\s/g, '')
.split('')
.map((c) => (c === '.' ? undefined : c))
}
const box1 = example`
ab ab
ab ab
` `
.replace(/\s/g, '')
.split('')
const box2 = ` const box2 = example`
aa aa
bb bb
` `
.replace(/\s/g, '')
.split('')
const box3 = ` const box3 = example`
aac aac
aaa aaa
dae dae
` `
.replace(/\s/g, '')
.split('')
const box4 = ` const box4 = example`
... ...
.aa .aa
.aa .aa
` `
.replace(/\s/g, '')
.split('')
.map((c) => (c === '.' ? undefined : c))
const box5 = ` const box5 = example`
..a ..a
..a ..a
.aa .aa
` `
.replace(/\s/g, '')
.split('')
.map((c) => (c === '.' ? undefined : c))
describe.each([ describe.each([
[ [