This repository has been archived by the owner on Mar 28, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
/
test.js
42 lines (36 loc) · 1.45 KB
/
test.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
import test from 'ava'
import isVendorPrefixed from './'
const prefixedProperties = [
'-ms-background-image', 'mso-background-image', // Microsoft
'-moz-background-image', // Mozilla
'-o-background-image', '-xv-background-image', // Opera Software
'-atsc-background-image', // Advanced Television Standards Committee
'-wap-background-image', // The WAP Forum
'-khtml-background-image', // KDE
'-webkit-background-image', // Apple
'prince-background-image', // YesLogic
'-ah-background-image', // Antenna House
'-hp-background-image', // Hewlett Packard
'-ro-background-image', // Real Objects
'-rim-background-image', // Research In Motion
'-tc-background-image' // TallComponents
]
const unprefixedProperties = [
'background-image',
'foo-bar',
'-not-valid-background-image',
'-mozbackground-image',
'mox-background-image'
]
test('returns true for prefixed properties', t => {
t.plan(prefixedProperties.length)
prefixedProperties.forEach(property => {
t.truthy(isVendorPrefixed(property))
})
})
test('returns false for unprefixed properties', t => {
t.plan(unprefixedProperties.length)
unprefixedProperties.forEach(property => {
t.falsy(isVendorPrefixed(property))
})
})