@cumulus/test-data
Advanced tools
Comparing version 9.7.0 to 9.8.0
@@ -10,3 +10,3 @@ "use strict"; | ||
const util_1 = require("util"); | ||
const readFile = util_1.promisify(fs_1.default.readFile); | ||
const readFile = (0, util_1.promisify)(fs_1.default.readFile); | ||
const testDataPath = (name) => path_1.default.join(__dirname, '..', name); | ||
@@ -19,6 +19,7 @@ /** | ||
*/ | ||
exports.loadTestData = (name) => { | ||
const loadTestData = (name) => { | ||
const filePath = testDataPath(name); | ||
return readFile(filePath, 'utf8'); | ||
}; | ||
exports.loadTestData = loadTestData; | ||
/** | ||
@@ -30,3 +31,4 @@ * Read and parse JSON-formatted test data | ||
*/ | ||
exports.loadJSONTestData = (name) => exports.loadTestData(name).then(JSON.parse); | ||
const loadJSONTestData = (name) => (0, exports.loadTestData)(name).then(JSON.parse); | ||
exports.loadJSONTestData = loadJSONTestData; | ||
/** | ||
@@ -38,6 +40,7 @@ * Get a stream containing test data | ||
*/ | ||
exports.streamTestData = (name) => { | ||
const streamTestData = (name) => { | ||
const filePath = testDataPath(name); | ||
return fs_1.default.createReadStream(filePath); | ||
}; | ||
exports.streamTestData = streamTestData; | ||
//# sourceMappingURL=index.js.map |
{ | ||
"name": "@cumulus/test-data", | ||
"version": "9.7.0", | ||
"version": "9.8.0", | ||
"description": "Includes the test data for various packages", | ||
@@ -32,3 +32,3 @@ "keywords": [ | ||
"license": "Apache-2.0", | ||
"gitHead": "08fb2c1d9113e7be465316f950d4ac9272bd3141" | ||
"gitHead": "913034ba6814e562b7f3d58bb39cf086255a6efd" | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
36154599
99
2441