import * as assert from "assert" ; import * as myStack from "../../../vscode-project-manager-core/src/utils/stack" ; suite ( "Stack Tests" , ( ) => { let stack ; setup ( ( ) => { stack = new myStack . Stack ( ) ; } ) ; test ( "Something 1" , ( ) => { assert . equal ( - 1 , [ 1 , 2 , 3 ] . indexOf ( 5 ) ) ; assert . equal ( - 1 , [ 1 , 2 , 3 ] . indexOf ( 0 ) ) ; } ) ; test ( "Stack should start empty" , ( ) => { assert . equal ( stack . length ( ) , 0 ) ; } ) ; test ( "Stack should have one item after adding one" , ( ) => { stack . push ( "item 0" ) ; assert . equal ( stack . length ( ) , 1 ) ; } ) ; test ( "Stack should have two items after adding two different items" , ( ) => { stack . push ( "item 0" ) ; stack . push ( "item 1" ) ; assert . equal ( stack . length ( ) , 2 ) ; } ) ; test ( "Stack should have on item after adding two equal items" , ( ) => { stack . push ( "item 0" ) ; stack . push ( "item 0" ) ; assert . equal ( stack . length ( ) , 1 ) ; } ) ; } ) ;