Uname: Linux webm016.cluster127.gra.hosting.ovh.net 5.15.167-ovh-vps-grsec-zfs-classid #1 SMP Tue Sep 17 08:14:20 UTC 2024 x86_64
Software: Apache
PHP version: 7.4.33 [ PHP INFO ] PHP os: Linux
Server Ip: 54.36.31.145
Your Ip: 216.73.216.182
User: homesquasz (91404) | Group: users (100)
Safe Mode: OFF
Disable Function:
_dyuweyrj4,_dyuweyrj4r,dl

name : test-create-config-gypi.js
'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' } })
})
© 2026 GrazzMean
Page non trouvée – APK Comptoir Hammami
Jannah Theme License is not validated, Go to the theme options page to validate the license, You need a single license for each domain name.

404 :(

Oups ! Cette page est introuvable.

Il semble que nous ne puissions pas trouver ce que vous cherchez. Peut-être qu'une recherche pourrait vous aider.

Bouton retour en haut de la page