Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Run real webpack in tests + upgrade webpack and Moment.js #6

Merged
merged 5 commits into from
Mar 24, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .npmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
test
8 changes: 7 additions & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,13 @@ function normalizeLocalesToKeep(localesToKeep) {

// Check if has unknown locales
var absentLocales = localesToKeep.filter(function(localeName) {
return moment.localeData(localeName) === null;
const localeData = moment.localeData(localeName);
return (
// For Moment 2.20.1−
localeData === null ||
// For Moment. 2.21.0+ – this version now returns a default locale instead of null
localeData === moment.localeData()
);
});
if (absentLocales.length > 0) {
throw new Error(
Expand Down
54 changes: 0 additions & 54 deletions index.test.js

This file was deleted.

Loading