mirror of
https://github.com/iptv-org/iptv.git
synced 2025-05-12 10:00:05 -04:00
Update database/export.js
This commit is contained in:
parent
a0eca2bebe
commit
8ac494f574
3 changed files with 3 additions and 3 deletions
|
@ -1,7 +1,7 @@
|
||||||
const { logger, db, file } = require('../../core')
|
const { logger, db, file } = require('../../core')
|
||||||
const _ = require('lodash')
|
const _ = require('lodash')
|
||||||
|
|
||||||
const PUBLIC_DIR = process.env.PUBLIC_DIR || '.gh-pages'
|
const PUBLIC_DIR = process.env.PUBLIC_DIR || '.api'
|
||||||
|
|
||||||
async function main() {
|
async function main() {
|
||||||
await db.streams.load()
|
await db.streams.load()
|
||||||
|
|
|
@ -9,13 +9,13 @@ beforeEach(() => {
|
||||||
)
|
)
|
||||||
|
|
||||||
const stdout = execSync(
|
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' }
|
{ encoding: 'utf8' }
|
||||||
)
|
)
|
||||||
})
|
})
|
||||||
|
|
||||||
it('can create streams.json', () => {
|
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) {
|
function content(filepath) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue