refactor(i18n): move message and id into a separate file
This commit is contained in:
@@ -12,7 +12,8 @@ import {
|
||||
} from 'angular2/testing_internal';
|
||||
|
||||
import {HtmlParser} from 'angular2/src/compiler/html_parser';
|
||||
import {MessageExtractor, Message, removeDuplicates} from 'angular2/src/i18n/message_extractor';
|
||||
import {MessageExtractor, removeDuplicates} from 'angular2/src/i18n/message_extractor';
|
||||
import {Message} from 'angular2/src/i18n/message';
|
||||
import {Parser} from 'angular2/src/core/change_detection/parser/parser';
|
||||
import {Lexer} from 'angular2/src/core/change_detection/parser/lexer';
|
||||
|
||||
|
||||
@@ -0,0 +1,27 @@
|
||||
import {
|
||||
AsyncTestCompleter,
|
||||
beforeEach,
|
||||
ddescribe,
|
||||
describe,
|
||||
expect,
|
||||
iit,
|
||||
inject,
|
||||
it,
|
||||
xdescribe,
|
||||
xit
|
||||
} from 'angular2/testing_internal';
|
||||
|
||||
import {Message, id} from 'angular2/src/i18n/message';
|
||||
|
||||
export function main() {
|
||||
ddescribe('Message', () => {
|
||||
describe("id", () => {
|
||||
it("should return a different id for messages with and without the meaning", () => {
|
||||
let m1 = new Message("content", "meaning", null);
|
||||
let m2 = new Message("content", null, null);
|
||||
expect(id(m1)).toEqual(id(m1));
|
||||
expect(id(m1)).not.toEqual(id(m2));
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
||||
Reference in New Issue
Block a user