update to stringify json and run prettier command before saving
This commit is contained in:
parent
21b011c750
commit
5f69df1c4b
|
@ -20,12 +20,15 @@ jobs:
|
||||||
|
|
||||||
# Install node modules for updatetestdata.js script
|
# Install node modules for updatetestdata.js script
|
||||||
- name: Install Dependencies
|
- name: Install Dependencies
|
||||||
run: npm install got
|
run: |
|
||||||
|
npm install got
|
||||||
|
npm install prettier
|
||||||
|
|
||||||
# Generate the new test data for the Health Checks
|
# Generate the new test data for the Health Checks
|
||||||
- name: Generate test data
|
- name: Generate test data
|
||||||
run: |
|
run: |
|
||||||
node packages/health-check/src/updatetestdata.js > packages/health-check/src/fixtures/testdata.json
|
node packages/health-check/src/updatetestdata.js > packages/health-check/src/fixtures/testdata.json
|
||||||
|
npx prettier --write packages/health-check/src/fixtures/testdata.json
|
||||||
|
|
||||||
# Commit the Updates to the test data
|
# Commit the Updates to the test data
|
||||||
- name: Update test data
|
- name: Update test data
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -7,7 +7,7 @@ async function getTestData() {
|
||||||
try {
|
try {
|
||||||
const query = `https://040e2npojpl9tiahghgls0d13bvacn5qo9jodruda8lcp3l4q3h1ikg.siasky.net/`;
|
const query = `https://040e2npojpl9tiahghgls0d13bvacn5qo9jodruda8lcp3l4q3h1ikg.siasky.net/`;
|
||||||
const json = await got(query).json();
|
const json = await got(query).json();
|
||||||
console.log(json);
|
console.log(JSON.stringify(json));
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.log(error);
|
console.log(error);
|
||||||
}
|
}
|
||||||
|
|
Reference in New Issue