Skip to content

Commit

Permalink
test: max-w-... look into width instead on maxWidth in theme in safari
Browse files Browse the repository at this point in the history
related to tw-in-js#185
  • Loading branch information
sastan committed Jun 2, 2021
1 parent 23cde7d commit 408870c
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/__tests__/api.json
Original file line number Diff line number Diff line change
Expand Up @@ -397,6 +397,8 @@
"max-w-none": ".max-w-none{max-width:none}",
"max-w-full": ".max-w-full{max-width:100%}",
"max-w-xs": ".max-w-xs{max-width:20rem}",
"max-w-xl": ".max-w-xl{max-width:36rem}",
"max-w-large": ".max-w-large{max-width:123rem}",
"max-w-screen-sm": ".max-w-screen-sm{max-width:640px}",
"max-h-full": ".max-h-full{max-height:100%}",
"max-h-screen": ".max-h-screen{max-height:100vh}",
Expand Down
11 changes: 11 additions & 0 deletions src/__tests__/api.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,9 @@ test.before((context) => {
gridAutoRows: {
'2fr': 'minmax(0,2fr)',
},
maxWidth: {
large: '123rem',
},
},
},
})
Expand Down Expand Up @@ -985,4 +988,12 @@ test('using interpolated arbitrary value', ({ tw, sheet }) => {
assert.equal(sheet.target, ['.p-\\[3px\\]{padding:3px}'])
})

test('#185 - max-w-... look into width instead on maxWidth in theme in safari', ({tw, sheet}) => {
assert.throws(() => {
tw('w-xl')
}, /\{"key":"width\.xl"\}/)

assert.equal(sheet.target, [])
})

test.run()

0 comments on commit 408870c

Please sign in to comment.