mirror of
https://github.com/zulip/zulip.git
synced 2025-11-16 03:41:58 +00:00
dependencies: Upgrade node to 12.3.1.
API changes: * The behaviour of Date.toLocaleTimeString() reverts to pre 8.0.0, this only affects automated tests. Lots of other API changes but we didn't use any of those. * The internal sorting algorithm changed which causes one of our own compare function to miss coverage.
This commit is contained in:
@@ -197,7 +197,7 @@ run_test('absolute_time_24_hour', () => {
|
||||
|
||||
run_test('set_full_datetime', () => {
|
||||
var message = {
|
||||
timestamp: 1495091573, // 2017-5-18 07:12:53 AM (UTC+0)
|
||||
timestamp: 1495091573, // 2017/5/18 7:12:53 AM (UTC+0)
|
||||
};
|
||||
var time_element = $('<span/>');
|
||||
var attrs = new Dict();
|
||||
@@ -207,14 +207,10 @@ run_test('set_full_datetime', () => {
|
||||
return time_element;
|
||||
};
|
||||
|
||||
// since node >= 8 date.toLocaleDateString and
|
||||
// date.toLocaleTimeString have been changed, instead of
|
||||
// returning 5/18/2017 7:12:53 AM (UTC+0) they now return
|
||||
// 2017-5-18 07:12:53 (UTC+0) - This change does not affect browsers
|
||||
// since browsers have their own way of returning string that is
|
||||
// or maybe inconsistenc with node's way.
|
||||
// The formatting of the string time.toLocale(Date|Time)String() on Node
|
||||
// might differ from the browser.
|
||||
var time = new Date(message.timestamp * 1000);
|
||||
var expected = `${time.toLocaleDateString()} 07:12:53 (UTC+0)`;
|
||||
var expected = `${time.toLocaleDateString()} 7:12:53 AM (UTC+0)`;
|
||||
timerender.set_full_datetime(message, time_element);
|
||||
var actual = attrs.get('title');
|
||||
assert.equal(expected, actual);
|
||||
|
||||
@@ -336,22 +336,30 @@ run_test('sort_recipients', () => {
|
||||
is_admin: false,
|
||||
is_bot: false,
|
||||
user_id: 43,
|
||||
}, {
|
||||
email: "a_user@zulip.net",
|
||||
full_name: "A user",
|
||||
is_admin: false,
|
||||
is_bot: false,
|
||||
user_id: 44,
|
||||
}, {
|
||||
email: "all",
|
||||
full_name: "All 2",
|
||||
is_admin: false,
|
||||
is_bot: false,
|
||||
user_id: 44,
|
||||
user_id: 45,
|
||||
},
|
||||
];
|
||||
|
||||
recipients = th.sort_recipients(small_matches, "a", "Linux", "Linux Topic");
|
||||
|
||||
recipients_email = _.map(recipients, function (person) {
|
||||
return person.email;
|
||||
});
|
||||
expected = [
|
||||
'all',
|
||||
'all',
|
||||
'a_user@zulip.net',
|
||||
];
|
||||
assert.deepEqual(recipients_email, expected);
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@ if [ "$TRAVIS" ] ; then
|
||||
ZULIP_SRV="/home/travis"
|
||||
fi
|
||||
YARN_PACKAGE_JSON="$ZULIP_SRV/zulip-yarn/package.json"
|
||||
node_version=8.11.1
|
||||
node_version=12.3.1
|
||||
yarn_version=1.16.0
|
||||
|
||||
# This is a fix for the fact that nvm uses $HOME to determine which
|
||||
|
||||
Reference in New Issue
Block a user