test: add hasIntl to failing test
Currently when node is configured --without-intl the tests in this commit fail. This commit adds checks for internationalization for these tests PR-URL: https://github.com/nodejs/node/pull/13699 Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com> Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
This commit is contained in:
parent
282b1edbe7
commit
a8979a6054
@ -111,6 +111,11 @@ Checks `hasCrypto` and `crypto` with fips.
|
||||
|
||||
Checks if [internationalization] is supported.
|
||||
|
||||
### hasSmallICU
|
||||
* return [<Boolean>](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Boolean_type)
|
||||
|
||||
Checks `hasIntl` and `small-icu` is supported.
|
||||
|
||||
### hasIPv6
|
||||
* return [<Boolean>](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Boolean_type)
|
||||
|
||||
|
@ -689,6 +689,12 @@ Object.defineProperty(exports, 'hasIntl', {
|
||||
}
|
||||
});
|
||||
|
||||
Object.defineProperty(exports, 'hasSmallICU', {
|
||||
get: function() {
|
||||
return process.binding('config').hasSmallICU;
|
||||
}
|
||||
});
|
||||
|
||||
// Useful for testing expected internal/error objects
|
||||
exports.expectsError = function expectsError({code, type, message}) {
|
||||
return function(error) {
|
||||
|
@ -1,5 +1,9 @@
|
||||
'use strict';
|
||||
require('../common');
|
||||
const common = require('../common');
|
||||
if (!(common.hasIntl && common.hasSmallICU)) {
|
||||
common.skip('missing Intl');
|
||||
return;
|
||||
}
|
||||
const assert = require('assert');
|
||||
const { spawnSync } = require('child_process');
|
||||
|
||||
|
@ -1,6 +1,10 @@
|
||||
'use strict';
|
||||
|
||||
require('../common');
|
||||
const common = require('../common');
|
||||
if (!common.hasIntl) {
|
||||
common.skip('missing Intl');
|
||||
return;
|
||||
}
|
||||
const strictEqual = require('assert').strictEqual;
|
||||
const url = require('url');
|
||||
|
||||
|
@ -1,6 +1,10 @@
|
||||
'use strict';
|
||||
|
||||
const common = require('../common');
|
||||
if (!common.hasIntl) {
|
||||
common.skip('missing Intl');
|
||||
return;
|
||||
}
|
||||
const assert = require('assert');
|
||||
const url = require('url');
|
||||
const URL = url.URL;
|
||||
|
Loading…
x
Reference in New Issue
Block a user