1 | const assert = require('assert')
|
2 | const ensurePath = require('../../src/ensure-path')
|
3 | const erase = require('../../src/erase')
|
4 | const wrote = require('../../src/')
|
5 | const read = require('../../src/read')
|
6 | const readDir = require('../../src/read-dir')
|
7 | const write = require('../../src/write')
|
8 | const readDirStructure = require('../../src/read-dir-structure')
|
9 | const createWritable = require('../../src/create-writable')
|
10 | const clone = require('../../src/clone')
|
11 | const exists = require('../../src/exists')
|
12 | const assertExists = require('../../src/assert-exists')
|
13 | const assertDoesNotExist = require('../../src/assert-does-not-exist')
|
14 | const readJSON = require('../../src/read-json')
|
15 | const writeJSON = require('../../src/write-json')
|
16 | const api = require('../../')
|
17 |
|
18 | const apiTestSuite = {
|
19 | '0.1.0 should export wrote': () => {
|
20 | assert.strictEqual(api, wrote)
|
21 | },
|
22 | '0.2.0 should export erase': () => {
|
23 | assert.strictEqual(api.erase, erase)
|
24 | },
|
25 | '0.3.0 should export write': () => {
|
26 | assert.strictEqual(api.write, write)
|
27 | },
|
28 | '0.4.0 should export ensurePath': () => {
|
29 | assert.strictEqual(api.ensurePath, ensurePath)
|
30 | },
|
31 | '0.5.0 should export read': () => {
|
32 | assert.strictEqual(api.read, read)
|
33 | },
|
34 | '0.6.0 should export readDir': () => {
|
35 | assert.strictEqual(api.readDir, readDir)
|
36 | },
|
37 | '0.7.0 should export readDirStructure': () => {
|
38 | assert.strictEqual(api.readDirStructure, readDirStructure)
|
39 | },
|
40 | '1.0.0 should export an object and createWritable instead of wrote'() {
|
41 | assert(typeof api === 'object')
|
42 | assert.strictEqual(api.createWritable, createWritable)
|
43 | },
|
44 | '1.1.0 should export clone'() {
|
45 | assert.strictEqual(api.clone, clone)
|
46 | },
|
47 | '1.2.0 should export exists, assertExists, assertDoesNotExist'() {
|
48 | assert.strictEqual(api.exists, exists)
|
49 | assert.strictEqual(api.assertExists, assertExists)
|
50 | assert.strictEqual(api.assertDoesNotExist, assertDoesNotExist)
|
51 | },
|
52 | '1.3.0 should export readJSON, writeJSON'() {
|
53 | assert.strictEqual(api.readJSON, readJSON)
|
54 | assert.strictEqual(api.writeJSON, writeJSON)
|
55 | },
|
56 | }
|
57 |
|
58 | module.exports = apiTestSuite
|