Skip to content

Commit

Permalink
test: test for content-visibility
Browse files Browse the repository at this point in the history
  • Loading branch information
Clarkkkk committed Sep 8, 2023
1 parent ebaa046 commit ffb42bd
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 0 deletions.
2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,8 @@
"dev": "vite --host",
"build": "tsc && vite build",
"test": "vitest",
"test:update": "vitest --update",
"test:run": "vitest --run --changed",
"test:coverage": "vitest --coverage",
"typecheck": "tsc --noEmit --watch --preserveWatchOutput",
"format": "eslint --fix --cache src/**/*.{vue,ts}",
Expand Down
21 changes: 21 additions & 0 deletions src/tests/content-visibility.test.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
import { describe, expect, test } from 'vitest'
import { getCss } from './utils'

describe('content-visibility', () => {
test('keyword values', async () => {
const classes = 'content-auto content-hidden content-visible'

const css = await getCss(classes)
expect(css).toMatchInlineSnapshot(`
".content-auto {
content-visibility: auto
}
.content-hidden {
content-visibility: hidden
}
.content-visible {
content-visibility: visible
}"
`)
})
})

0 comments on commit ffb42bd

Please sign in to comment.