Add a unit test

This commit is contained in:
Mohamed Hegazy 2015-06-17 21:20:20 -07:00
parent 3d224bde48
commit 54ed3c475e
4 changed files with 63 additions and 0 deletions

View file

@ -0,0 +1,22 @@
//// [namespacesDeclaration.ts]
module M {
export namespace N {
export module M2 {
export interface I {}
}
}
}
//// [namespacesDeclaration.js]
//// [namespacesDeclaration.d.ts]
declare module M {
namespace N {
module M2 {
interface I {
}
}
}
}

View file

@ -0,0 +1,16 @@
=== tests/cases/compiler/namespacesDeclaration.ts ===
module M {
>M : Symbol(M, Decl(namespacesDeclaration.ts, 0, 0))
export namespace N {
>N : Symbol(N, Decl(namespacesDeclaration.ts, 1, 10))
export module M2 {
>M2 : Symbol(M2, Decl(namespacesDeclaration.ts, 2, 23))
export interface I {}
>I : Symbol(I, Decl(namespacesDeclaration.ts, 3, 24))
}
}
}

View file

@ -0,0 +1,16 @@
=== tests/cases/compiler/namespacesDeclaration.ts ===
module M {
>M : any
export namespace N {
>N : any
export module M2 {
>M2 : any
export interface I {}
>I : I
}
}
}

View file

@ -0,0 +1,9 @@
// @declaration: true
module M {
export namespace N {
export module M2 {
export interface I {}
}
}
}