mirror of
https://github.com/nodejs/node.git
synced 2025-05-06 18:29:01 +00:00

The tap skipping output is so prevalent yet obscure in nature that we ought to move it into it's own function in test/common.js PR-URL: https://github.com/nodejs/node/pull/6697 Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com> Reviewed-By: Fedor Indutny <fedor.indutny@gmail.com>
16 lines
411 B
JavaScript
16 lines
411 B
JavaScript
'use strict';
|
|
const common = require('../common');
|
|
const assert = require('assert');
|
|
|
|
if (global.Intl === undefined || Intl.v8BreakIterator === undefined) {
|
|
return common.skip('no Intl');
|
|
}
|
|
|
|
try {
|
|
new Intl.v8BreakIterator();
|
|
// May succeed if data is available - OK
|
|
} catch (e) {
|
|
// May throw this error if ICU data is not available - OK
|
|
assert.throws(() => new Intl.v8BreakIterator(), /ICU data/);
|
|
}
|