From 17d0b203e14f6c25922ce897657fb2b2503dcd88 Mon Sep 17 00:00:00 2001 From: mhkeller Date: Wed, 21 Aug 2019 20:31:20 -0400 Subject: [PATCH] remove yaml tests --- test/test.js | 262 --------------------------------------------------- 1 file changed, 262 deletions(-) diff --git a/test/test.js b/test/test.js index 5b9842e..b02704a 100644 --- a/test/test.js +++ b/test/test.js @@ -119,18 +119,6 @@ describe('discernFormat()', function () { }) }) - describe('yaml', function () { - it('should properly discern yaml format', function () { - assert.equal(io.discernFormat(testDataPath('yaml/empty.yaml')), 'yaml') - }) - }) - - describe('yml', function () { - it('should properly discern yml format', function () { - assert.equal(io.discernFormat(testDataPath('yml/empty.yml')), 'yml') - }) - }) - describe('txt', function () { it('should properly discern txt format', function () { assert.equal(io.discernFormat(testDataPath('txt/empty.txt')), 'txt') @@ -209,26 +197,6 @@ describe('discernParser()', function () { }) }) - describe('yaml', function () { - it('should be yaml parser', function () { - assert.equal(io.discernParser(testDataPath('yaml/empty.yaml')).toString(), io.parsers.yaml.toString()) - }) - - it('should be yaml parser as method', function () { - assert.equal(io.discernParser(testDataPath('yaml/empty.yaml')).toString(), io.parseYaml.toString()) - }) - }) - - describe('yml', function () { - it('should be yml parser', function () { - assert.equal(io.discernParser(testDataPath('yml/empty.yml')).toString(), io.parsers.yml.toString()) - }) - - it('should be yml parser as method', function () { - assert.equal(io.discernParser(testDataPath('yml/empty.yml')).toString(), io.parseYaml.toString()) - }) - }) - describe('txt', function () { it('should be txt parser', function () { assert.equal(io.discernParser(testDataPath('txt/empty.txt')).toString(), io.parsers.txt.toString()) @@ -328,26 +296,6 @@ describe('discernFileFormatter()', function () { }) }) - describe('yaml', function () { - it('should be yaml formatter', function () { - assert.equal(io.discernFileFormatter(testDataPath('yaml/empty.yaml')).toString(), io.formatters.yaml.toString()) - }) - - it('should be yaml formatter as method', function () { - assert.equal(io.discernFileFormatter(testDataPath('yaml/empty.yaml')).toString(), io.formatYaml.toString()) - }) - }) - - describe('yml', function () { - it('should be yml formatter', function () { - assert.equal(io.discernFileFormatter(testDataPath('yml/empty.yml')).toString(), io.formatters.yml.toString()) - }) - - it('should be yml formatter as method', function () { - assert.equal(io.discernFileFormatter(testDataPath('yml/empty.yml')).toString(), io.formatYaml.toString()) - }) - }) - describe('txt', function () { it('should be txt formatter', function () { assert.equal(io.discernFileFormatter(testDataPath('txt/empty.txt')).toString(), io.formatters.txt.toString()) @@ -827,64 +775,6 @@ describe('readers', function () { }) }) - describe('yaml', function () { - it('should match expected json', function () { - var json = io.readDataSync(testDataPath('yaml/basic.yaml')) - assert(_.isEqual(JSON.stringify(json), '{"name":"jim","occupation":"land surveyor","height":70}')) - }) - }) - - describe('yaml with map', function () { - it('should match expected json', function () { - var json = io.readDataSync(testDataPath('yaml/basic.yaml'), { - map: function (yamlFile) { - yamlFile.height = yamlFile.height * 2 - return yamlFile - } - }) - assert(_.isEqual(JSON.stringify(json), '{"name":"jim","occupation":"land surveyor","height":140}')) - }) - }) - - describe('yaml with map shorthand', function () { - it('should match expected json', function () { - var json = io.readDataSync(testDataPath('yaml/basic.yaml'), function (yamlFile) { - yamlFile.height = yamlFile.height * 2 - return yamlFile - }) - assert(_.isEqual(JSON.stringify(json), '{"name":"jim","occupation":"land surveyor","height":140}')) - }) - }) - - describe('yml', function () { - it('should match expected json', function () { - var json = io.readDataSync(testDataPath('yml/basic.yml')) - assert(_.isEqual(JSON.stringify(json), '{"name":"jim","occupation":"land surveyor","height":70}')) - }) - }) - - describe('yml with map', function () { - it('should match expected json', function () { - var json = io.readDataSync(testDataPath('yml/basic.yml'), { - map: function (yamlFile) { - yamlFile.height = yamlFile.height * 2 - return yamlFile - } - }) - assert(_.isEqual(JSON.stringify(json), '{"name":"jim","occupation":"land surveyor","height":140}')) - }) - }) - - describe('yml with map shorthand', function () { - it('should match expected json', function () { - var json = io.readDataSync(testDataPath('yml/basic.yml'), function (yamlFile) { - yamlFile.height = yamlFile.height * 2 - return yamlFile - }) - assert(_.isEqual(JSON.stringify(json), '{"name":"jim","occupation":"land surveyor","height":140}')) - }) - }) - describe('aml', function () { it('should match expected json', function () { var json = io.readDataSync(testDataPath('aml/basic.aml')) @@ -1287,82 +1177,6 @@ describe('readers', function () { }) }) - describe('yaml', function () { - it('should match expected json', function (done) { - io.readData(testDataPath('yaml/basic.yaml'), function (err, json) { - assert.equal(err, null) - assert(_.isEqual(JSON.stringify(json), '{"name":"jim","occupation":"land surveyor","height":70}')) - done() - }) - }) - }) - - describe('yaml with map', function () { - it('should match expected json', function (done) { - io.readData(testDataPath('yaml/basic.yaml'), { - map: function (yamlFile) { - yamlFile.height = yamlFile.height * 2 - return yamlFile - } - }, function (err, json) { - assert.equal(err, null) - assert(_.isEqual(JSON.stringify(json), '{"name":"jim","occupation":"land surveyor","height":140}')) - done() - }) - }) - }) - - describe('yaml with map shorthand', function () { - it('should match expected json', function (done) { - io.readData(testDataPath('yaml/basic.yaml'), function (yamlFile) { - yamlFile.height = yamlFile.height * 2 - return yamlFile - }, function (err, json) { - assert.equal(err, null) - assert(_.isEqual(JSON.stringify(json), '{"name":"jim","occupation":"land surveyor","height":140}')) - done() - }) - }) - }) - - describe('yml', function () { - it('should match expected json', function (done) { - io.readData(testDataPath('yml/basic.yml'), function (err, json) { - assert.equal(err, null) - assert(_.isEqual(JSON.stringify(json), '{"name":"jim","occupation":"land surveyor","height":70}')) - done() - }) - }) - }) - - describe('yml with map', function () { - it('should match expected json', function (done) { - io.readData(testDataPath('yml/basic.yml'), { - map: function (yamlFile) { - yamlFile.height = yamlFile.height * 2 - return yamlFile - } - }, function (err, json) { - assert.equal(err, null) - assert(_.isEqual(JSON.stringify(json), '{"name":"jim","occupation":"land surveyor","height":140}')) - done() - }) - }) - }) - - describe('yml with map shorthand', function () { - it('should match expected json', function (done) { - io.readData(testDataPath('yml/basic.yml'), function (yamlFile) { - yamlFile.height = yamlFile.height * 2 - return yamlFile - }, function (err, json) { - assert.equal(err, null) - assert(_.isEqual(JSON.stringify(json), '{"name":"jim","occupation":"land surveyor","height":140}')) - done() - }) - }) - }) - describe('aml', function () { it('should match expected json', function (done) { io.readData(testDataPath('aml/basic.aml'), function (err, json) { @@ -2023,82 +1837,6 @@ describe('directReaders', function () { }) }) - describe('readYamlSync()', function () { - describe('empty yaml', function () { - it('should be empty object', function () { - var json = io.readYamlSync(testDataPath('yaml/empty.yaml')) - assert(_.isEmpty(json)) - assert(_.isObject(json)) - }) - }) - - describe('basic yaml', function () { - it('should match expected json', function () { - var json = io.readYamlSync(testDataPath('yaml/basic.yaml')) - assert(_.isEqual(JSON.stringify(json), '{"name":"jim","occupation":"land surveyor","height":70}')) - }) - }) - - describe('basic yaml map', function () { - it('should match expected json', function () { - var json = io.readYamlSync(testDataPath('yaml/basic.yaml'), { - map: function (yamlFile) { - yamlFile.height = yamlFile.height * 2 - return yamlFile - } - }) - assert(_.isEqual(JSON.stringify(json), '{"name":"jim","occupation":"land surveyor","height":140}')) - }) - }) - - describe('basic yaml map shorthand', function () { - it('should match expected json', function () { - var json = io.readYamlSync(testDataPath('yaml/basic.yaml'), function (yamlFile) { - yamlFile.height = yamlFile.height * 2 - return yamlFile - }) - assert(_.isEqual(JSON.stringify(json), '{"name":"jim","occupation":"land surveyor","height":140}')) - }) - }) - - describe('empty yml', function () { - it('should be empty object', function () { - var json = io.readYamlSync(testDataPath('yml/empty.yml')) - assert(_.isEmpty(json)) - assert(_.isObject(json)) - }) - }) - - describe('basic yml', function () { - it('should match expected json', function () { - var json = io.readYamlSync(testDataPath('yml/basic.yml')) - assert(_.isEqual(JSON.stringify(json), '{"name":"jim","occupation":"land surveyor","height":70}')) - }) - }) - - describe('basic yml map', function () { - it('should match expected json', function () { - var json = io.readYamlSync(testDataPath('yml/basic.yml'), { - map: function (yamlFile) { - yamlFile.height = yamlFile.height * 2 - return yamlFile - } - }) - assert(_.isEqual(JSON.stringify(json), '{"name":"jim","occupation":"land surveyor","height":140}')) - }) - }) - - describe('basic yml map shorthand', function () { - it('should match expected json', function () { - var json = io.readYamlSync(testDataPath('yml/basic.yml'), function (yamlFile) { - yamlFile.height = yamlFile.height * 2 - return yamlFile - }) - assert(_.isEqual(JSON.stringify(json), '{"name":"jim","occupation":"land surveyor","height":140}')) - }) - }) - }) - describe('readAmlSync()', function () { describe('empty', function () { it('should be empty object', function () {