1
0
mirror of https://github.com/ianstormtaylor/slate.git synced 2025-08-31 10:51:44 +02:00

fix tests to ignore .DS_Store

This commit is contained in:
Ian Storm Taylor
2016-09-03 17:52:00 -07:00
parent b227c0444d
commit da274c818f
2 changed files with 10 additions and 0 deletions

View File

@@ -18,6 +18,7 @@ describe('serializers', () => {
const tests = fs.readdirSync(dir)
for (const test of tests) {
if (test[0] === '.') continue
it(test, () => {
const innerDir = resolve(dir, test)
const html = new Html(require(innerDir).default)
@@ -35,6 +36,7 @@ describe('serializers', () => {
const tests = fs.readdirSync(dir)
for (const test of tests) {
if (test[0] === '.') continue
it(test, () => {
const innerDir = resolve(dir, test)
const html = new Html(require(innerDir).default)
@@ -56,6 +58,7 @@ describe('serializers', () => {
const tests = fs.readdirSync(dir)
for (const test of tests) {
if (test[0] === '.') continue
it(test, () => {
const innerDir = resolve(dir, test)
const expected = readMetadata.sync(resolve(innerDir, 'output.yaml'))
@@ -72,6 +75,7 @@ describe('serializers', () => {
const tests = fs.readdirSync(dir)
for (const test of tests) {
if (test[0] === '.') continue
it(test, () => {
const innerDir = resolve(dir, test)
const input = require(resolve(innerDir, 'input.js')).default
@@ -89,6 +93,7 @@ describe('serializers', () => {
const tests = fs.readdirSync(dir)
for (const test of tests) {
if (test[0] === '.') continue
it(test, () => {
const innerDir = resolve(dir, test)
const expected = readMetadata.sync(resolve(innerDir, 'output.yaml'))
@@ -105,6 +110,7 @@ describe('serializers', () => {
const tests = fs.readdirSync(dir)
for (const test of tests) {
if (test[0] === '.') continue
it(test, () => {
const innerDir = resolve(dir, test)
const input = require(resolve(innerDir, 'input.js')).default
@@ -121,6 +127,7 @@ describe('serializers', () => {
const tests = fs.readdirSync(dir)
for (const test of tests) {
if (test[0] === '.') continue
it(test, () => {
const innerDir = resolve(dir, test)
const expected = readMetadata.sync(resolve(innerDir, 'output.yaml'))
@@ -137,6 +144,7 @@ describe('serializers', () => {
const tests = fs.readdirSync(dir)
for (const test of tests) {
if (test[0] === '.') continue
it(test, () => {
const innerDir = resolve(dir, test)
const input = require(resolve(innerDir, 'input.js')).default

View File

@@ -16,11 +16,13 @@ describe('transforms', () => {
const transforms = fs.readdirSync(dir)
for (const transform of transforms) {
if (transform[0] === '.') continue
describe(`${toCamel(transform)}()`, () => {
const dir = resolve(__dirname, './fixtures', transform)
const tests = fs.readdirSync(dir)
for (const test of tests) {
if (test[0] === '.') continue
it(test, () => {
const innerDir = resolve(dir, test)
const fn = require(innerDir).default