LookAtMySuitBot/js/node_modules/mojangson/test/additional.test.js

22 lines
498 B
JavaScript
Raw Normal View History

2023-12-24 20:08:39 -05:00
/* eslint-env mocha */
const assert = require('assert')
const fs = require('fs')
const mojangson = require('../')
const tests = ['test001', 'test002']
describe('additional', function () {
const data = []
for (const test of tests) {
const text = fs.readFileSync(`test/${test}.txt`, 'utf-8')
data.push([text, require(`./${test}.json`)])
}
data.forEach(function (a) {
it('should be equal', function () {
assert.deepStrictEqual(mojangson.parse(a[0]), a[1])
})
})
})