@@ -56,41 +56,32 @@ describe("Token", function() {
5656 EmbarkSpec . deployAll ( contractsConfig , ( ) => { done ( ) } ) ;
5757 } ) ;
5858
59- it ( "not deploy Token" , function ( done ) {
59+ it ( "not deploy Token" , function ( ) {
6060 assert . equal ( Token . address , "" ) ;
61- done ( ) ;
6261 } ) ;
6362
64- it ( "not deploy MyToken and MyToken2" , function ( done ) {
63+ it ( "not deploy MyToken and MyToken2" , function ( ) {
6564 assert . notEqual ( MyToken . address , "" ) ;
6665 assert . notEqual ( MyToken2 . address , "" ) ;
67- done ( ) ;
6866 } ) ;
6967
70- it ( "set MyToken Balance correctly" , function ( done ) {
71- MyToken . methods . _supply ( ) . call ( ) . then ( function ( result ) {
72- assert . equal ( result , 1000 ) ;
73- done ( ) ;
74- } ) ;
68+ it ( "set MyToken Balance correctly" , async function ( ) {
69+ let result = await MyToken . methods . _supply ( ) . call ( ) ;
70+ assert . equal ( result , 1000 ) ;
7571 } ) ;
7672
77- it ( "set MyToken2 Balance correctly" , function ( done ) {
78- MyToken2 . methods . _supply ( ) . call ( ) . then ( function ( result ) {
79- assert . equal ( result , 2000 ) ;
80- done ( ) ;
81- } ) ;
73+ it ( "set MyToken2 Balance correctly" , async function ( ) {
74+ let result = await MyToken2 . methods . _supply ( ) . call ( ) ;
75+ assert . equal ( result , 2000 ) ;
8276 } ) ;
8377
84- it ( "get right address" , function ( done ) {
78+ it ( "get right address" , function ( ) {
8579 assert . equal ( AlreadyDeployedToken . address , "0xCAFECAFECAFECAFECAFECAFECAFECAFECAFECAFE" ) ;
86- done ( ) ;
8780 } ) ;
8881
89- it ( "should use onDeploy" , function ( done ) {
90- Test . methods . addr ( ) . call ( ) . then ( function ( result ) {
91- assert . equal ( result , MyToken . address )
92- done ( ) ;
93- } ) ;
82+ it ( "should use onDeploy" , async function ( ) {
83+ let result = await Test . methods . addr ( ) . call ( ) ;
84+ assert . equal ( result , MyToken . address )
9485 } ) ;
9586
9687} ) ;
0 commit comments