Files
marketing-app/server/node_modules/node-gyp/test/test-create-config-gypi.js
fahed 35d84b6bff Marketing Hub: RBAC, i18n (AR/EN), tasks overhaul, team/user merge, tutorial
Features:
- Full RBAC with 3 roles (superadmin/manager/contributor)
- Ownership tracking on posts, tasks, campaigns, projects
- Task system: assign to anyone, filter combobox, visibility scoping
- Team members merged into users table (single source of truth)
- Post thumbnails on kanban cards from attachments
- Publication link validation before publishing
- Interactive onboarding tutorial with Settings restart
- Full Arabic/English i18n with RTL layout support
- Language toggle in sidebar, IBM Plex Sans Arabic font
- Brand-based visibility filtering for non-superadmins
- Manager can only create contributors
- Profile completion flow for new users
- Cookie-based sessions (express-session + SQLite)
2026-02-08 20:46:58 +03:00

71 lines
2.0 KiB
JavaScript

'use strict'
const path = require('path')
const { test } = require('tap')
const gyp = require('../lib/node-gyp')
const createConfigGypi = require('../lib/create-config-gypi')
const { parseConfigGypi, getCurrentConfigGypi } = createConfigGypi.test
test('config.gypi with no options', async function (t) {
t.plan(2)
const prog = gyp()
prog.parseArgv([])
const config = await getCurrentConfigGypi({ gyp: prog, vsInfo: {} })
t.equal(config.target_defaults.default_configuration, 'Release')
t.equal(config.variables.target_arch, process.arch)
})
test('config.gypi with --debug', async function (t) {
t.plan(1)
const prog = gyp()
prog.parseArgv(['_', '_', '--debug'])
const config = await getCurrentConfigGypi({ gyp: prog, vsInfo: {} })
t.equal(config.target_defaults.default_configuration, 'Debug')
})
test('config.gypi with custom options', async function (t) {
t.plan(1)
const prog = gyp()
prog.parseArgv(['_', '_', '--shared-libxml2'])
const config = await getCurrentConfigGypi({ gyp: prog, vsInfo: {} })
t.equal(config.variables.shared_libxml2, true)
})
test('config.gypi with nodedir', async function (t) {
t.plan(1)
const nodeDir = path.join(__dirname, 'fixtures', 'nodedir')
const prog = gyp()
prog.parseArgv(['_', '_', `--nodedir=${nodeDir}`])
const config = await getCurrentConfigGypi({ gyp: prog, nodeDir, vsInfo: {} })
t.equal(config.variables.build_with_electron, true)
})
test('config.gypi with --force-process-config', async function (t) {
t.plan(1)
const nodeDir = path.join(__dirname, 'fixtures', 'nodedir')
const prog = gyp()
prog.parseArgv(['_', '_', '--force-process-config', `--nodedir=${nodeDir}`])
const config = await getCurrentConfigGypi({ gyp: prog, nodeDir, vsInfo: {} })
t.equal(config.variables.build_with_electron, undefined)
})
test('config.gypi parsing', function (t) {
t.plan(1)
const str = "# Some comments\n{'variables': {'multiline': 'A'\n'B'}}"
const config = parseConfigGypi(str)
t.deepEqual(config, { variables: { multiline: 'AB' } })
})