local i=require("\046\046\047\108\101\114\112")local J=require("\064\112\107\103\047\064\106\115\100\111\116\108\117\097\047\106\101\115\116-\103\108\111\098\097\108\115")local d=J.expect local k=J.it k("\103\105\118\101\115 \116\104\101 \105\110\105\116\105\097\108 \118\097\108\117\101 \119\104\101\110 \097\108\112\104\097 \105\115 \097\116 \048",function()(d(i(1,10,0))).toBe(1)end)k("\103\105\118\101\115 \116\104\101 \102\105\110\097\108 \118\097\108\117\101 \119\104\101\110 \097\108\112\104\097 \105\115 \097\116 \049",function()(d(i(5,10,1))).toBe(10)end)k("\103\105\118\101\115 \116\104\101 \109\105\100\100\108\101 \118\097\108\117\101 \119\104\101\110 \097\108\112\104\097 \105\115 \097\116 \048\046\053",function()(d(i(1,2,.5))).toBe(1.5)end)
local lerp = require('../lerp')

local JestGlobals = require('@pkg/@jsdotlua/jest-globals')
local expect = JestGlobals.expect
local it = JestGlobals.it

it('gives the initial value when alpha is at 0', function()
    expect(lerp(1, 10, 0)).toBe(1)
end)

it('gives the final value when alpha is at 1', function()
    expect(lerp(5, 10, 1)).toBe(10)
end)

it('gives the middle value when alpha is at 0.5', function()
    expect(lerp(1, 2, 0.5)).toBe(1.5)
end)
