Format all files fot he new definition

This commit is contained in:
CJ Patoilo
2020-05-15 01:20:35 -03:00
parent 831481f1c8
commit 9a63e760df
16 changed files with 16718 additions and 14597 deletions

View File

@@ -5,29 +5,29 @@ const path = require('path')
let dist = path.join(__dirname, '../../dist')
test.before('`dist` path should be created', t => {
t.true(fs.lstatSync(dist).isDirectory())
t.true(fs.lstatSync(dist).isDirectory())
})
test('`milligram.css` should be created', t => {
fs.readdirSync(dist).map(file => {
if (file === 'milligram.css') t.is(file, 'milligram.css')
})
fs.readdirSync(dist).map(file => {
if (file === 'milligram.css') t.is(file, 'milligram.css')
})
})
test('`milligram.min.css` should be created', t => {
fs.readdirSync(dist).map(file => {
if (file === 'milligram.min.css') t.is(file, 'milligram.min.css')
})
fs.readdirSync(dist).map(file => {
if (file === 'milligram.min.css') t.is(file, 'milligram.min.css')
})
})
test('`milligram.css.map` should be created', t => {
fs.readdirSync(dist).map(file => {
if (file === 'milligram.css.map') t.is(file, 'milligram.css.map')
})
fs.readdirSync(dist).map(file => {
if (file === 'milligram.css.map') t.is(file, 'milligram.css.map')
})
})
test('`milligram.min.css.map` should be created', t => {
fs.readdirSync(dist).map(file => {
if (file === 'milligram.min.css.map') t.is(file, 'milligram.min.css.map')
})
fs.readdirSync(dist).map(file => {
if (file === 'milligram.min.css.map') t.is(file, 'milligram.min.css.map')
})
})

View File

@@ -3,90 +3,102 @@ const npm = require('../../package.json')
const bower = require('../../bower.json')
const composer = require('../../composer.json')
const packages = [
npm,
bower,
composer
]
const packages = [npm, bower, composer]
test(`Name should be equal "${npm.name}"`, t => {
packages.map((referenceValue, referenceIndex) => {
packages.map((compareValue, compareIndex) => {
if (compareValue.name.match('/')) compareValue.name = compareValue.name.split('/')[1]
if (referenceIndex !== compareIndex) t.is(referenceValue.name, compareValue.name)
})
})
packages.map((referenceValue, referenceIndex) => {
packages.map((compareValue, compareIndex) => {
if (compareValue.name.match('/'))
compareValue.name = compareValue.name.split('/')[1]
if (referenceIndex !== compareIndex)
t.is(referenceValue.name, compareValue.name)
})
})
})
test(`Version should be equal to "v${npm.version}"`, t => {
packages.map((referenceValue, referenceIndex) => {
packages.map((compareValue, compareIndex) => {
if (referenceIndex !== compareIndex) t.is(referenceValue.version, compareValue.version)
})
})
packages.map((referenceValue, referenceIndex) => {
packages.map((compareValue, compareIndex) => {
if (referenceIndex !== compareIndex)
t.is(referenceValue.version, compareValue.version)
})
})
})
test(`Description should be equal to "${npm.description}"`, t => {
packages.map((referenceValue, referenceIndex) => {
packages.map((compareValue, compareIndex) => {
if (referenceIndex !== compareIndex) t.is(referenceValue.description, compareValue.description)
})
})
packages.map((referenceValue, referenceIndex) => {
packages.map((compareValue, compareIndex) => {
if (referenceIndex !== compareIndex)
t.is(referenceValue.description, compareValue.description)
})
})
})
test(`Homepage should be equal to "${npm.homepage}"`, t => {
packages.map((referenceValue, referenceIndex) => {
packages.map((compareValue, compareIndex) => {
if (referenceIndex !== compareIndex) t.is(referenceValue.homepage, compareValue.homepage)
})
})
packages.map((referenceValue, referenceIndex) => {
packages.map((compareValue, compareIndex) => {
if (referenceIndex !== compareIndex)
t.is(referenceValue.homepage, compareValue.homepage)
})
})
})
test(`Repository should be equal to "${npm.repository}"`, t => {
packages.map((referenceValue, referenceIndex) => {
packages.map((compareValue, compareIndex) => {
if (referenceIndex !== compareIndex) t.is(referenceValue.repository, compareValue.repository)
})
})
packages.map((referenceValue, referenceIndex) => {
packages.map((compareValue, compareIndex) => {
if (referenceIndex !== compareIndex)
t.is(referenceValue.repository, compareValue.repository)
})
})
})
test(`License should be equal to "${npm.license}"`, t => {
packages.map((referenceValue, referenceIndex) => {
packages.map((compareValue, compareIndex) => {
if (referenceIndex !== compareIndex) t.is(referenceValue.license, compareValue.license)
})
})
packages.map((referenceValue, referenceIndex) => {
packages.map((compareValue, compareIndex) => {
if (referenceIndex !== compareIndex)
t.is(referenceValue.license, compareValue.license)
})
})
})
test(`Author Name should be equal to "${npm.author}"`, t => {
packages.map((referenceValue, referenceIndex) => {
packages.map((compareValue, compareIndex) => {
if (referenceIndex !== compareIndex) t.is(referenceValue.author, compareValue.author)
})
})
packages.map((referenceValue, referenceIndex) => {
packages.map((compareValue, compareIndex) => {
if (referenceIndex !== compareIndex)
t.is(referenceValue.author, compareValue.author)
})
})
})
test(`Main File should be equal to "${npm.main}"`, t => {
packages.map((referenceValue, referenceIndex) => {
packages.map((compareValue, compareIndex) => {
if (referenceIndex !== compareIndex) t.is(referenceValue.main, compareValue.main)
})
})
packages.map((referenceValue, referenceIndex) => {
packages.map((compareValue, compareIndex) => {
if (referenceIndex !== compareIndex)
t.is(referenceValue.main, compareValue.main)
})
})
})
test('Ignore should be equal', t => {
packages.map((referenceValue, referenceIndex) => {
packages.map((compareValue, compareIndex) => {
if (referenceIndex !== compareIndex) t.is(JSON.stringify(referenceValue.ignore), JSON.stringify(compareValue.ignore))
})
})
packages.map((referenceValue, referenceIndex) => {
packages.map((compareValue, compareIndex) => {
if (referenceIndex !== compareIndex)
t.is(
JSON.stringify(referenceValue.ignore),
JSON.stringify(compareValue.ignore)
)
})
})
})
test('Keywords should be equal', t => {
packages.map((referenceValue, referenceIndex) => {
packages.map((compareValue, compareIndex) => {
if (referenceIndex !== compareIndex) t.is(JSON.stringify(referenceValue.keywords), JSON.stringify(compareValue.keywords))
})
})
packages.map((referenceValue, referenceIndex) => {
packages.map((compareValue, compareIndex) => {
if (referenceIndex !== compareIndex)
t.is(
JSON.stringify(referenceValue.keywords),
JSON.stringify(compareValue.keywords)
)
})
})
})