mirror of
https://github.com/nodejs/node.git
synced 2026-11-21 12:59:16 -05:00
ESLint 4.x has stricter linting than previous versions. We are currently using the legacy indentation rules in the test directory. This commit changes the indentation of files to comply with the stricter 4.x linting and enable stricter linting in the test directory. Backport-PR-URL: https://github.com/nodejs/node/pull/14522 Backport-Reviewed-By: Anna Henningsen <anna@addaleax.net> PR-URL: https://github.com/nodejs/node/pull/14431 Reviewed-By: Refael Ackermann <refack@gmail.com> Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com> Reviewed-By: Trevor Norris <trev.norris@gmail.com>
31 lines
1.0 KiB
JavaScript
31 lines
1.0 KiB
JavaScript
'use strict';
|
|
// This test checks the usage of --use-bundled-ca and --use-openssl-ca arguments
|
|
// to verify that both are not used at the same time.
|
|
const common = require('../common');
|
|
if (!common.hasCrypto)
|
|
common.skip('missing crypto');
|
|
|
|
const assert = require('assert');
|
|
const os = require('os');
|
|
const childProcess = require('child_process');
|
|
const result = childProcess.spawnSync(process.execPath, [
|
|
'--use-bundled-ca',
|
|
'--use-openssl-ca',
|
|
'-p', 'process.version'],
|
|
{encoding: 'utf8'});
|
|
|
|
assert.strictEqual(result.stderr, `${process.execPath
|
|
}: either --use-openssl-ca or --use-bundled-ca can be used, not both${os.EOL}`
|
|
);
|
|
assert.strictEqual(result.status, 9);
|
|
|
|
const useBundledCA = childProcess.spawnSync(process.execPath, [
|
|
'--use-bundled-ca',
|
|
'-p', 'process.version']);
|
|
assert.strictEqual(useBundledCA.status, 0);
|
|
|
|
const useOpenSSLCA = childProcess.spawnSync(process.execPath, [
|
|
'--use-openssl-ca',
|
|
'-p', 'process.version']);
|
|
assert.strictEqual(useOpenSSLCA.status, 0);
|