2019-02-10 12:57:36 +08:00
|
|
|
'use strict';
|
|
|
|
require('../common');
|
|
|
|
const assert = require('assert');
|
|
|
|
|
|
|
|
process.env.NODE_DISABLE_COLORS = true;
|
|
|
|
process.stderr.columns = 20;
|
|
|
|
|
|
|
|
// Confirm that there is no position indicator.
|
|
|
|
assert.throws(
|
2021-10-28 00:15:11 +08:00
|
|
|
() => { assert.strictEqual('a'.repeat(30), 'a'.repeat(31)); },
|
2023-01-30 02:14:30 +08:00
|
|
|
(err) => !err.message.includes('^'),
|
2019-02-10 12:57:36 +08:00
|
|
|
);
|
|
|
|
|
|
|
|
// Confirm that there is a position indicator.
|
|
|
|
assert.throws(
|
2021-10-28 00:15:11 +08:00
|
|
|
() => { assert.strictEqual('aaaa', 'aaaaa'); },
|
2023-01-30 02:14:30 +08:00
|
|
|
(err) => err.message.includes('^'),
|
2019-02-10 12:57:36 +08:00
|
|
|
);
|