@environment-safe/file 0.1.0 → 0.1.1

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@environment-safe/file",
3
- "version": "0.1.0",
3
+ "version": "0.1.1",
4
4
  "type": "module",
5
5
  "main": "dist/index.mjs",
6
6
  "module": "src/index.mjs",
package/src/index.mjs CHANGED
@@ -207,8 +207,8 @@ export class Download{
207
207
  this.promise = null;
208
208
  }
209
209
  async observe(download){
210
- const text = await download.text();
211
- this.flushPromise(text);
210
+ const result = await download;
211
+ this.flushPromise(result);
212
212
  }
213
213
  }
214
214
 
package/test/test.mjs CHANGED
@@ -89,7 +89,8 @@ describe('@environment-safe/file', ()=>{
89
89
  file.body('foo!');
90
90
  const anticipatedDownload = download.expect();
91
91
  await file.save();
92
- const downloadedText = await anticipatedDownload;
92
+ const result = await anticipatedDownload;
93
+ const downloadedText = await result.text();
93
94
  downloadedText.should.equal('foo!');
94
95
  });
95
96