Improve plugin constant tests
This commit is contained in:
parent
dc3d902234
commit
2b9f672b58
|
@ -47,11 +47,12 @@ if [ "$1" = "client" ]; then
|
||||||
|
|
||||||
feedsFiles=$(findTestFiles ./dist/server/tests/feeds)
|
feedsFiles=$(findTestFiles ./dist/server/tests/feeds)
|
||||||
helperFiles=$(findTestFiles ./dist/server/tests/helpers)
|
helperFiles=$(findTestFiles ./dist/server/tests/helpers)
|
||||||
|
libFiles=$(findTestFiles ./dist/server/tests/lib)
|
||||||
miscFiles="./dist/server/tests/client.js ./dist/server/tests/misc-endpoints.js"
|
miscFiles="./dist/server/tests/client.js ./dist/server/tests/misc-endpoints.js"
|
||||||
# Not in plugin task, it needs an index.html
|
# Not in plugin task, it needs an index.html
|
||||||
pluginFiles="./dist/server/tests/plugins/html-injection.js"
|
pluginFiles="./dist/server/tests/plugins/html-injection.js"
|
||||||
|
|
||||||
MOCHA_PARALLEL=true runTest "$1" 2 $feedsFiles $helperFiles $miscFiles $pluginFiles
|
MOCHA_PARALLEL=true runTest "$1" 2 $feedsFiles $helperFiles $miscFiles $pluginFiles $libFiles
|
||||||
elif [ "$1" = "cli-plugin" ]; then
|
elif [ "$1" = "cli-plugin" ]; then
|
||||||
npm run build:server
|
npm run build:server
|
||||||
npm run setup:cli
|
npm run setup:cli
|
||||||
|
|
|
@ -7,24 +7,26 @@ async function register ({
|
||||||
getRouter
|
getRouter
|
||||||
}) {
|
}) {
|
||||||
videoLanguageManager.addConstant('al_bhed', 'Al Bhed')
|
videoLanguageManager.addConstant('al_bhed', 'Al Bhed')
|
||||||
videoLanguageManager.addConstant('al_bhed2', 'Al Bhed 2')
|
videoLanguageManager.addLanguage('al_bhed2', 'Al Bhed 2')
|
||||||
videoLanguageManager.addConstant('al_bhed3', 'Al Bhed 3')
|
videoLanguageManager.addConstant('al_bhed3', 'Al Bhed 3')
|
||||||
videoLanguageManager.deleteConstant('en')
|
videoLanguageManager.deleteConstant('en')
|
||||||
videoLanguageManager.deleteConstant('fr')
|
videoLanguageManager.deleteLanguage('fr')
|
||||||
videoLanguageManager.deleteConstant('al_bhed3')
|
videoLanguageManager.deleteConstant('al_bhed3')
|
||||||
|
|
||||||
videoCategoryManager.addConstant(42, 'Best category')
|
videoCategoryManager.addCategory(42, 'Best category')
|
||||||
videoCategoryManager.addConstant(43, 'High best category')
|
videoCategoryManager.addConstant(43, 'High best category')
|
||||||
videoCategoryManager.deleteConstant(1) // Music
|
videoCategoryManager.deleteConstant(1) // Music
|
||||||
videoCategoryManager.deleteConstant(2) // Films
|
videoCategoryManager.deleteCategory(2) // Films
|
||||||
|
|
||||||
videoLicenceManager.addConstant(42, 'Best licence')
|
videoLicenceManager.addLicence(42, 'Best licence')
|
||||||
videoLicenceManager.addConstant(43, 'High best licence')
|
videoLicenceManager.addConstant(43, 'High best licence')
|
||||||
videoLicenceManager.deleteConstant(1) // Attribution
|
videoLicenceManager.deleteConstant(1) // Attribution
|
||||||
videoLicenceManager.deleteConstant(7) // Public domain
|
videoLicenceManager.deleteConstant(7) // Public domain
|
||||||
|
|
||||||
videoPrivacyManager.deleteConstant(2)
|
videoPrivacyManager.deleteConstant(2)
|
||||||
|
videoPrivacyManager.deletePrivacy(2)
|
||||||
playlistPrivacyManager.deleteConstant(3)
|
playlistPrivacyManager.deleteConstant(3)
|
||||||
|
playlistPrivacyManager.deletePlaylistPrivacy(3)
|
||||||
|
|
||||||
{
|
{
|
||||||
const router = getRouter()
|
const router = getRouter()
|
||||||
|
|
|
@ -6,3 +6,4 @@ import './cli/'
|
||||||
import './api/'
|
import './api/'
|
||||||
import './plugins/'
|
import './plugins/'
|
||||||
import './helpers/'
|
import './helpers/'
|
||||||
|
import './lib/'
|
||||||
|
|
|
@ -0,0 +1 @@
|
||||||
|
export * from './video-constant-registry-factory'
|
Loading…
Reference in New Issue