Skip to content
This repository was archived by the owner on Feb 22, 2018. It is now read-only.

Commit 0c65be8

Browse files
alan-knightchirayuk
authored andcommitted
chore(intl): support newer version of "intl"
Angular's pubspec for intl spans versions with breaking changes. For Angular, a change in date formatting would be a breaking change but changes do to CLDR updates are not breaking changes. This commit updates a test to swap out a locale with a CLDR update to one that wasn't updated to enable it to pass across the CLDR breaking change. Closes #1203
1 parent ee8ecd3 commit 0c65be8

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

pubspec.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ dependencies:
2121
collection: '>=0.9.1 <1.0.0'
2222
di: '>=2.0.1 <3.0.0'
2323
html5lib: '>=0.10.0 <0.11.0'
24-
intl: '>=0.8.7 <0.10.0'
24+
intl: '>=0.8.7 <0.12.0'
2525
perf_api: '>=0.0.8 <0.1.0'
2626
route_hierarchical: '>=0.4.21 <0.5.0'
2727
web_components: '>=0.3.3 <0.4.0'

test/formatter/date_spec.dart

+7-1
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,13 @@ void main() {
4747
});
4848

4949
it('should accept various locales', async(() {
50-
expect(Intl.withLocale('de', () => date(noon, "medium"))).toEqual('3. Sep 2010 12:05:08');
50+
// Angular's pubspec for intl spans versions with breaking changes. This
51+
// is ok for Angular, because they are not breaking changes for us (e.g.
52+
// date formatting changes would be breaking changes, but CLDR updates are
53+
// not.) The tests below use SV and FR which are mostly stable across
54+
// different versions of the intl package (as opposed to DE which received
55+
// CLDR updates.)
56+
expect(Intl.withLocale('sv', () => date(noon, "medium"))).toEqual('3 sep 2010 12:05:08');
5157
expect(Intl.withLocale('fr', () => date(noon, "medium"))).toEqual('3 sept. 2010 12:05:08');
5258
}));
5359
});

0 commit comments

Comments
 (0)