1
1
mirror of https://github.com/primer/css.git synced 2024-11-30 11:17:05 +03:00
css/__tests__/css.test.js
Jon Rohan 87b0b1d4c9
Removing the duplicate deprecation backgrounds (#1663)
* Removing the duplicate deprecation backgrounds

* Create thick-monkeys-film.md
2021-10-08 09:20:20 -07:00

34 lines
891 B
JavaScript

import {
getCurrentVersion,
getPackageStats,
getSelectorDiff,
getVariableDiff,
currentVersionDeprecations
} from './utils/css'
import semver from 'semver'
let selectorsDiff, variablesDiff, version
beforeAll(async () => {
selectorsDiff = getSelectorDiff()
variablesDiff = getVariableDiff()
version = getCurrentVersion()
})
describe('css', () => {
it('The support.css file contains no compiled css', () => {
const supportStats = getPackageStats('support')
expect(supportStats.size).toEqual(0)
})
})
describe('deprecations', () => {
it('expects deprecations and their replacement to not be equal.', () => {
const deprecations = currentVersionDeprecations()
Object.keys(deprecations["selectors"]).forEach(deprecation => {
const replacement = deprecations["selectors"][deprecation]
expect(deprecation).not.toEqual(replacement)
})
})
})