From 8ac494f574fac7aa01e601a46b592f64b7f2ae7b Mon Sep 17 00:00:00 2001 From: Aleksandr Statciuk Date: Sun, 13 Feb 2022 11:50:57 +0300 Subject: [PATCH] Update database/export.js --- scripts/commands/database/export.js | 2 +- tests/__data__/expected/{.gh-pages => .api}/streams.json | 0 tests/commands/database/export.test.js | 4 ++-- 3 files changed, 3 insertions(+), 3 deletions(-) rename tests/__data__/expected/{.gh-pages => .api}/streams.json (100%) diff --git a/scripts/commands/database/export.js b/scripts/commands/database/export.js index 50991df29..ccdfaa7d1 100644 --- a/scripts/commands/database/export.js +++ b/scripts/commands/database/export.js @@ -1,7 +1,7 @@ const { logger, db, file } = require('../../core') const _ = require('lodash') -const PUBLIC_DIR = process.env.PUBLIC_DIR || '.gh-pages' +const PUBLIC_DIR = process.env.PUBLIC_DIR || '.api' async function main() { await db.streams.load() diff --git a/tests/__data__/expected/.gh-pages/streams.json b/tests/__data__/expected/.api/streams.json similarity index 100% rename from tests/__data__/expected/.gh-pages/streams.json rename to tests/__data__/expected/.api/streams.json diff --git a/tests/commands/database/export.test.js b/tests/commands/database/export.test.js index ae7c00b56..b0ab866ed 100644 --- a/tests/commands/database/export.test.js +++ b/tests/commands/database/export.test.js @@ -9,13 +9,13 @@ beforeEach(() => { ) const stdout = execSync( - 'DB_DIR=tests/__data__/output PUBLIC_DIR=tests/__data__/output/.gh-pages npm run db:export', + 'DB_DIR=tests/__data__/output PUBLIC_DIR=tests/__data__/output/.api npm run db:export', { encoding: 'utf8' } ) }) it('can create streams.json', () => { - expect(content(`output/.gh-pages/streams.json`)).toBe(content(`expected/.gh-pages/streams.json`)) + expect(content(`output/.api/streams.json`)).toBe(content(`expected/.api/streams.json`)) }) function content(filepath) {