summaryrefslogtreecommitdiff
path: root/tools/ts_library_builder/test.ts
diff options
context:
space:
mode:
authorKitson Kelly <me@kitsonkelly.com>2018-11-09 11:09:18 +1100
committerRyan Dahl <ry@tinyclouds.org>2018-11-09 08:39:49 -0800
commit34b6b86c76111396dd46e46015ad5536d6baa883 (patch)
tree6c668147aa01f2be031f10bc594100a392bb7531 /tools/ts_library_builder/test.ts
parent172f5a51332b24c1027ea0f22d7e71b516dcd7d5 (diff)
Ensure global type instances are available.
Diffstat (limited to 'tools/ts_library_builder/test.ts')
-rw-r--r--tools/ts_library_builder/test.ts10
1 files changed, 9 insertions, 1 deletions
diff --git a/tools/ts_library_builder/test.ts b/tools/ts_library_builder/test.ts
index 3a18fe29c..71b1d19a0 100644
--- a/tools/ts_library_builder/test.ts
+++ b/tools/ts_library_builder/test.ts
@@ -149,7 +149,15 @@ test(function buildLibraryMerge() {
variableDeclarations[4].getType().getText(),
`typeof moduleD.reprocess`
);
- assertEqual(variableDeclarations.length, 5);
+ assertEqual(
+ variableDeclarations[5].getType().getText(),
+ `typeof moduleC.Bar`
+ );
+ assertEqual(variableDeclarations.length, 6);
+ const typeAliases = targetSourceFile.getTypeAliases();
+ assertEqual(typeAliases[0].getName(), "Bar");
+ assertEqual(typeAliases[0].getType().getText(), "moduleC.Bar");
+ assertEqual(typeAliases.length, 1);
});
// TODO author unit tests for `ast_util.ts`