@dword-design/tester-plugin-tmp-dir 2.1.5 → 2.1.6

Sign up to get free protection for your applications and to get access to all the features.
Files changed (2) hide show
  1. package/dist/index.js +7 -2
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -10,9 +10,14 @@ var _withLocalTmpDir = _interopRequireDefault(require("with-local-tmp-dir"));
10
10
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
11
11
 
12
12
  var _default = options => ({
13
- transform: test => function () {
14
- return (0, _withLocalTmpDir.default)(() => test.call(this), options);
13
+ async afterEach() {
14
+ await this.resetWithLocalTmpDir();
15
+ },
16
+
17
+ async beforeEach() {
18
+ this.resetWithLocalTmpDir = await (0, _withLocalTmpDir.default)(options);
15
19
  }
20
+
16
21
  });
17
22
 
18
23
  exports.default = _default;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dword-design/tester-plugin-tmp-dir",
3
- "version": "2.1.5",
3
+ "version": "2.1.6",
4
4
  "repository": "dword-design/tester-plugin-tmp-dir",
5
5
  "funding": "https://github.com/sponsors/dword-design",
6
6
  "license": "MIT",