@@ -107,7 +107,7 @@ export class ExpressionTests {
107107 @Test ( "Bitop [5.1]" )
108108 public bitOperatorOverride51 ( input : string , lua : string ) {
109109 // Bit operations not supported in 5.1, expect an exception
110- Expect ( ( ) => util . transpileString ( input , { luaTarget : LuaTarget . Lua51 , dontRequireLuaLib : true } ) )
110+ Expect ( ( ) => util . transpileString ( input , { luaTarget : LuaTarget . Lua51 , luaLibImport : "none" } ) )
111111 . toThrow ( ) ;
112112 }
113113
@@ -126,7 +126,7 @@ export class ExpressionTests {
126126 @TestCase ( "a>>>=b" , "a = bit.arshift(a,b)" )
127127 @Test ( "Bitop [JIT]" )
128128 public bitOperatorOverrideJIT ( input : string , lua : string ) {
129- Expect ( util . transpileString ( input , { luaTarget : LuaTarget . LuaJIT , dontRequireLuaLib : true } ) ) . toBe ( lua ) ;
129+ Expect ( util . transpileString ( input , { luaTarget : LuaTarget . LuaJIT , luaLibImport : "none" } ) ) . toBe ( lua ) ;
130130 }
131131
132132 @TestCase ( "~a" , "bit32.bnot(a)" )
@@ -144,7 +144,7 @@ export class ExpressionTests {
144144 @TestCase ( "a>>>=b" , "a = bit32.arshift(a,b)" )
145145 @Test ( "Bitop [5.2]" )
146146 public bitOperatorOverride52 ( input : string , lua : string ) {
147- Expect ( util . transpileString ( input , { luaTarget : LuaTarget . Lua52 , dontRequireLuaLib : true } ) ) . toBe ( lua ) ;
147+ Expect ( util . transpileString ( input , { luaTarget : LuaTarget . Lua52 , luaLibImport : "none" } ) ) . toBe ( lua ) ;
148148 }
149149
150150 @TestCase ( "~a" , "~a" )
@@ -160,14 +160,14 @@ export class ExpressionTests {
160160 @TestCase ( "a>>=b" , "a = a >> b" )
161161 @Test ( "Bitop [5.3]" )
162162 public bitOperatorOverride53 ( input : string , lua : string ) {
163- Expect ( util . transpileString ( input , { luaTarget : LuaTarget . Lua53 , dontRequireLuaLib : true } ) ) . toBe ( lua ) ;
163+ Expect ( util . transpileString ( input , { luaTarget : LuaTarget . Lua53 , luaLibImport : "none" } ) ) . toBe ( lua ) ;
164164 }
165165
166166 @TestCase ( "a>>>b" )
167167 @TestCase ( "a>>>=b" )
168168 @Test ( "Unsupported bitop 5.3" )
169169 public bitOperatorOverride53Unsupported ( input : string ) {
170- Expect ( ( ) => util . transpileString ( input , { luaTarget : LuaTarget . Lua53 , dontRequireLuaLib : true } ) )
170+ Expect ( ( ) => util . transpileString ( input , { luaTarget : LuaTarget . Lua53 , luaLibImport : "none" } ) )
171171 . toThrowError ( Error , "Bitwise operator >>> not supported in Lua 5.3" ) ;
172172 }
173173
0 commit comments