aboutsummaryrefslogtreecommitdiff
path: root/test-data-generator
diff options
context:
space:
mode:
authormat <27899617+mat-1@users.noreply.github.com>2021-06-02 16:04:59 -0500
committerGitHub <noreply@github.com>2021-06-02 16:04:59 -0500
commit709d428b4cb94e8eca53b6f32e0f8b1be5a323b9 (patch)
treee1581056d7d7ea9fa254184627c9cb71362cdc0f /test-data-generator
parent732dfb76766533687982d7232078411af76bd2a9 (diff)
downloadskyblock-api-709d428b4cb94e8eca53b6f32e0f8b1be5a323b9.tar.gz
skyblock-api-709d428b4cb94e8eca53b6f32e0f8b1be5a323b9.tar.bz2
skyblock-api-709d428b4cb94e8eca53b6f32e0f8b1be5a323b9.zip
include more data about skills (#51)
Diffstat (limited to 'test-data-generator')
-rw-r--r--test-data-generator/index.ts13
1 files changed, 11 insertions, 2 deletions
diff --git a/test-data-generator/index.ts b/test-data-generator/index.ts
index 408f76a..b0b3ba6 100644
--- a/test-data-generator/index.ts
+++ b/test-data-generator/index.ts
@@ -20,7 +20,7 @@ const playerUuids = [
async function writeTestData(requestPath: string, name: string, contents: any) {
const dir = path.join(__dirname, '..', 'test', 'data', requestPath)
- await fs.mkdir(dir, { recursive: true })
+ await fs.mkdir(path.dirname(path.join(dir, `${name}.json`)), { recursive: true })
await fs.writeFile(path.join(dir, `${name}.json`), JSON.stringify(contents, null, 2))
}
@@ -35,7 +35,16 @@ async function addResponse(requestPath: string, args: { [ key: string ]: string
async function addConstants() {
- const constantNames = ['collections', 'minions', 'skills', 'slayers', 'stats', 'zones']
+ const constantNames = [
+ 'collections',
+ 'minions',
+ 'skills',
+ 'slayers',
+ 'stats',
+ 'zones',
+ 'manual/skill_xp',
+ 'manual/skill_xp_easier',
+ ]
for (const constantName of constantNames) {
const constantData = await constants.fetchJSONConstant(constantName + '.json')
await writeTestData('constants', constantName, constantData)