22 lines
		
	
	
		
			478 B
		
	
	
	
		
			Lua
		
	
	
	
		
		
			
		
	
	
			22 lines
		
	
	
		
			478 B
		
	
	
	
		
			Lua
		
	
	
	
|  | --Make sure the type checking works | ||
|  | 
 | ||
|  | describe("smr type checking",function() | ||
|  | 	it("should load without errors",function() | ||
|  | 		local types = require("types") | ||
|  | 	end) | ||
|  | 	it("should not error when an argument is a number",function() | ||
|  | 		local types = require("types") | ||
|  | 		local n = 5 | ||
|  | 		assert(types.number(n)) | ||
|  | 	end) | ||
|  | 	it("should error when an argument is a table",function() | ||
|  | 		local types = require("types") | ||
|  | 		local t = {} | ||
|  | 		assert.has.errors(function() | ||
|  | 			types.number(t) | ||
|  | 		end) | ||
|  | 	end) | ||
|  | end) | ||
|  | 
 | ||
|  | 
 |