test-filesystem 1.3.7 → 1.3.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/README.md +61 -61
  2. package/package.json +10 -10
package/README.md CHANGED
@@ -51,37 +51,37 @@ An assortment of objects that can be used in tests and some functions to help de
51
51
  **Author**: Joshua Heagle <joshuaheagle@gmail.com>
52
52
 
53
53
  * [test-fs](#module_test-fs)
54
- * [.circularObject](#module_test-fs.circularObject) : <code>Object.&lt;string, (string\|Object\|Array)&gt;</code>
55
- * [.deepReferenceObject](#module_test-fs.deepReferenceObject) : <code>Object.&lt;string, (string\|number\|Object)&gt;</code>
56
- * [.domItem](#module_test-fs.domItem) : <code>Object.&lt;string, (string\|number\|Array\|Object)&gt;</code>
57
- * [.jsonDom](#module_test-fs.jsonDom) : <code>Object.&lt;string, (string\|number\|Array\|Object)&gt;</code>
58
- * [.linkedList](#module_test-fs.linkedList) : <code>Object.&lt;string, (string\|Object)&gt;</code>
59
- * [.multiReferenceObject](#module_test-fs.multiReferenceObject) : <code>Object.&lt;string, (string\|number\|Object)&gt;</code>
60
54
  * [.nodeTree](#module_test-fs.nodeTree) : <code>Object.&lt;string, (string\|Object\|Array)&gt;</code>
61
- * [.countMatches(content, search)](#module_test-fs.countMatches) <code>number</code>
62
- * [.fileExists(filePath)](#module_test-fs.fileExists) <code>boolean</code>
63
- * [.logObject(object, [label], [outputType])](#module_test-fs.logObject) <code>string</code> \| <code>undefined</code>
64
- * [.removeDirectory(dirPath)](#module_test-fs.removeDirectory) <code>Promise.&lt;\*&gt;</code>
55
+ * [.multiReferenceObject](#module_test-fs.multiReferenceObject) : <code>Object.&lt;string, (string\|number\|Object)&gt;</code>
56
+ * [.linkedList](#module_test-fs.linkedList) : <code>Object.&lt;string, (string\|Object)&gt;</code>
57
+ * [.jsonDom](#module_test-fs.jsonDom) : <code>Object.&lt;string, (string\|number\|Array\|Object)&gt;</code>
58
+ * [.domItem](#module_test-fs.domItem) : <code>Object.&lt;string, (string\|number\|Array\|Object)&gt;</code>
59
+ * [.deepReferenceObject](#module_test-fs.deepReferenceObject) : <code>Object.&lt;string, (string\|number\|Object)&gt;</code>
60
+ * [.circularObject](#module_test-fs.circularObject) : <code>Object.&lt;string, (string\|Object\|Array)&gt;</code>
65
61
  * [.afterEach()](#module_test-fs.afterEach) ⇒ <code>Promise.&lt;\*&gt;</code>
66
62
  * [.exports.afterEach([exists])](#module_test-fs.exports.afterEach) ⇒ <code>Promise.&lt;(\*\|void)&gt;</code>
67
63
  * [.exports.createTempDir()](#module_test-fs.exports.createTempDir) ⇒ <code>Promise.&lt;(\*\|void)&gt;</code>
64
+ * [.removeDirectory(dirPath)](#module_test-fs.removeDirectory) ⇒ <code>Promise.&lt;\*&gt;</code>
65
+ * [.logObject(object, [label], [outputType])](#module_test-fs.logObject) ⇒ <code>string</code> \| <code>undefined</code>
66
+ * [.fileExists(filePath)](#module_test-fs.fileExists) ⇒ <code>boolean</code>
67
+ * [.countMatches(content, search)](#module_test-fs.countMatches) ⇒ <code>number</code>
68
68
 
69
- <a name="module_test-fs.circularObject"></a>
69
+ <a name="module_test-fs.nodeTree"></a>
70
70
 
71
- ### test-fs.circularObject : <code>Object.&lt;string, (string\|Object\|Array)&gt;</code>
72
- Multilayered node tree-like structure with parent references
71
+ ### test-fs.nodeTree : <code>Object.&lt;string, (string\|Object\|Array)&gt;</code>
72
+ Sample NodeTree for testing circular references and arrays.
73
73
 
74
74
  **Kind**: static constant of [<code>test-fs</code>](#module_test-fs)
75
- <a name="module_test-fs.deepReferenceObject"></a>
75
+ <a name="module_test-fs.multiReferenceObject"></a>
76
76
 
77
- ### test-fs.deepReferenceObject : <code>Object.&lt;string, (string\|number\|Object)&gt;</code>
78
- Sample object with deep references.
77
+ ### test-fs.multiReferenceObject : <code>Object.&lt;string, (string\|number\|Object)&gt;</code>
78
+ Sample of an object containing multiple references.
79
79
 
80
80
  **Kind**: static constant of [<code>test-fs</code>](#module_test-fs)
81
- <a name="module_test-fs.domItem"></a>
81
+ <a name="module_test-fs.linkedList"></a>
82
82
 
83
- ### test-fs.domItem : <code>Object.&lt;string, (string\|number\|Array\|Object)&gt;</code>
84
- Sample of domItem child with nested child and optional details
83
+ ### test-fs.linkedList : <code>Object.&lt;string, (string\|Object)&gt;</code>
84
+ Sample LinkedList for testing circular references.
85
85
 
86
86
  **Kind**: static constant of [<code>test-fs</code>](#module_test-fs)
87
87
  <a name="module_test-fs.jsonDom"></a>
@@ -90,46 +90,57 @@ Sample of domItem child with nested child and optional details
90
90
  Sample of jsonDom object containing an empty nested array and objects
91
91
 
92
92
  **Kind**: static constant of [<code>test-fs</code>](#module_test-fs)
93
- <a name="module_test-fs.linkedList"></a>
93
+ <a name="module_test-fs.domItem"></a>
94
94
 
95
- ### test-fs.linkedList : <code>Object.&lt;string, (string\|Object)&gt;</code>
96
- Sample LinkedList for testing circular references.
95
+ ### test-fs.domItem : <code>Object.&lt;string, (string\|number\|Array\|Object)&gt;</code>
96
+ Sample of domItem child with nested child and optional details
97
97
 
98
98
  **Kind**: static constant of [<code>test-fs</code>](#module_test-fs)
99
- <a name="module_test-fs.multiReferenceObject"></a>
99
+ <a name="module_test-fs.deepReferenceObject"></a>
100
100
 
101
- ### test-fs.multiReferenceObject : <code>Object.&lt;string, (string\|number\|Object)&gt;</code>
102
- Sample of an object containing multiple references.
101
+ ### test-fs.deepReferenceObject : <code>Object.&lt;string, (string\|number\|Object)&gt;</code>
102
+ Sample object with deep references.
103
103
 
104
104
  **Kind**: static constant of [<code>test-fs</code>](#module_test-fs)
105
- <a name="module_test-fs.nodeTree"></a>
105
+ <a name="module_test-fs.circularObject"></a>
106
106
 
107
- ### test-fs.nodeTree : <code>Object.&lt;string, (string\|Object\|Array)&gt;</code>
108
- Sample NodeTree for testing circular references and arrays.
107
+ ### test-fs.circularObject : <code>Object.&lt;string, (string\|Object\|Array)&gt;</code>
108
+ Multilayered node tree-like structure with parent references
109
109
 
110
110
  **Kind**: static constant of [<code>test-fs</code>](#module_test-fs)
111
- <a name="module_test-fs.countMatches"></a>
111
+ <a name="module_test-fs.afterEach"></a>
112
112
 
113
- ### test-fs.countMatches(content, search) ⇒ <code>number</code>
114
- Simple way to count string occurrences for testing.
113
+ ### test-fs.afterEach() ⇒ <code>Promise.&lt;\*&gt;</code>
114
+ In the Jest.afterEach function call this one to clean up and remove the temp directory.
115
115
 
116
116
  **Kind**: static method of [<code>test-fs</code>](#module_test-fs)
117
+ <a name="module_test-fs.exports.afterEach"></a>
117
118
 
118
- | Param | Type |
119
- | --- | --- |
120
- | content | <code>string</code> |
121
- | search | <code>string</code> |
119
+ ### test-fs.exports.afterEach([exists]) <code>Promise.&lt;(\*\|void)&gt;</code>
120
+ Ensure that the del has completed, recursively attempt to delete and recreate
122
121
 
123
- <a name="module_test-fs.fileExists"></a>
122
+ **Kind**: static method of [<code>test-fs</code>](#module_test-fs)
124
123
 
125
- ### test-fs.fileExists(filePath) <code>boolean</code>
126
- Detect if a file exists and is usable.
124
+ | Param | Type | Default |
125
+ | --- | --- | --- |
126
+ | [exists] | <code>boolean</code> | <code>true</code> |
127
+
128
+ <a name="module_test-fs.exports.createTempDir"></a>
129
+
130
+ ### test-fs.exports.createTempDir() ⇒ <code>Promise.&lt;(\*\|void)&gt;</code>
131
+ In the Jest.beforeEach function call this one to set up the temp directory.
132
+
133
+ **Kind**: static method of [<code>test-fs</code>](#module_test-fs)
134
+ <a name="module_test-fs.removeDirectory"></a>
135
+
136
+ ### test-fs.removeDirectory(dirPath) ⇒ <code>Promise.&lt;\*&gt;</code>
137
+ Return a promise to be completed once the specified directory is deleted.
127
138
 
128
139
  **Kind**: static method of [<code>test-fs</code>](#module_test-fs)
129
140
 
130
141
  | Param | Type |
131
142
  | --- | --- |
132
- | filePath | <code>string</code> |
143
+ | dirPath | <code>string</code> |
133
144
 
134
145
  <a name="module_test-fs.logObject"></a>
135
146
 
@@ -144,37 +155,26 @@ Log out an object in a nicely formatted way.
144
155
  | [label] | <code>string</code> | <code>&quot;logging&quot;</code> |
145
156
  | [outputType] | <code>string</code> | <code>&quot;log&quot;</code> |
146
157
 
147
- <a name="module_test-fs.removeDirectory"></a>
158
+ <a name="module_test-fs.fileExists"></a>
148
159
 
149
- ### test-fs.removeDirectory(dirPath) ⇒ <code>Promise.&lt;\*&gt;</code>
150
- Return a promise to be completed once the specified directory is deleted.
160
+ ### test-fs.fileExists(filePath) ⇒ <code>boolean</code>
161
+ Detect if a file exists and is usable.
151
162
 
152
163
  **Kind**: static method of [<code>test-fs</code>](#module_test-fs)
153
164
 
154
165
  | Param | Type |
155
166
  | --- | --- |
156
- | dirPath | <code>string</code> |
157
-
158
- <a name="module_test-fs.afterEach"></a>
159
-
160
- ### test-fs.afterEach() ⇒ <code>Promise.&lt;\*&gt;</code>
161
- In the Jest.afterEach function call this one to clean up and remove the temp directory.
167
+ | filePath | <code>string</code> |
162
168
 
163
- **Kind**: static method of [<code>test-fs</code>](#module_test-fs)
164
- <a name="module_test-fs.exports.afterEach"></a>
169
+ <a name="module_test-fs.countMatches"></a>
165
170
 
166
- ### test-fs.exports.afterEach([exists]) ⇒ <code>Promise.&lt;(\*\|void)&gt;</code>
167
- Ensure that the del has completed, recursively attempt to delete and recreate
171
+ ### test-fs.countMatches(content, search) ⇒ <code>number</code>
172
+ Simple way to count string occurrences for testing.
168
173
 
169
174
  **Kind**: static method of [<code>test-fs</code>](#module_test-fs)
170
175
 
171
- | Param | Type | Default |
172
- | --- | --- | --- |
173
- | [exists] | <code>boolean</code> | <code>true</code> |
174
-
175
- <a name="module_test-fs.exports.createTempDir"></a>
176
-
177
- ### test-fs.exports.createTempDir() ⇒ <code>Promise.&lt;(\*\|void)&gt;</code>
178
- In the Jest.beforeEach function call this one to set up the temp directory.
176
+ | Param | Type |
177
+ | --- | --- |
178
+ | content | <code>string</code> |
179
+ | search | <code>string</code> |
179
180
 
180
- **Kind**: static method of [<code>test-fs</code>](#module_test-fs)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "test-filesystem",
3
- "version": "1.3.7",
3
+ "version": "1.3.9",
4
4
  "description": "Set up and tear down a temp directory for running filesystem tests.",
5
5
  "main": "dist/main.js",
6
6
  "module": "./dist/main.mjs",
@@ -46,20 +46,20 @@
46
46
  "vinyl-source-stream": "^2.0.0"
47
47
  },
48
48
  "devDependencies": {
49
- "@babel/core": "^7.25.9",
50
- "@babel/plugin-transform-modules-commonjs": "^7.25.9",
51
- "@babel/preset-typescript": "^7.25.9",
52
- "babel-jest": "^29.7.0",
49
+ "@babel/core": "^7.28.4",
50
+ "@babel/plugin-transform-modules-commonjs": "^7.27.1",
51
+ "@babel/preset-typescript": "^7.27.1",
52
+ "babel-jest": "^30.1.2",
53
53
  "browserify": "^17.0.1",
54
- "glob": "^11.0.0",
55
- "gulp": "^5.0.0",
54
+ "glob": "^11.0.3",
55
+ "gulp": "^5.0.1",
56
56
  "gulp-babel": "^8.0.0",
57
- "gulp-rename": "^2.0.0",
57
+ "gulp-rename": "^2.1.0",
58
58
  "gulp-standard": "^14.0.0",
59
59
  "gulp-typescript": "^6.0.0-alpha.1",
60
60
  "gulp-uglify-es": "^3.0.0",
61
- "jest": "^29.7.0",
62
- "jsdoc-to-markdown": "^9.0.4",
61
+ "jest": "^30.1.3",
62
+ "jsdoc-to-markdown": "^9.1.2",
63
63
  "through2": "^4.0.2"
64
64
  },
65
65
  "engines": {