local F=game:GetService("\082\101\112\108\105\099\097\116\101\100\083\116\111\114\097\103\101")local I=require(F.Packages.Dex.Observables.Eased)local s=require(F.Packages.Dex.Observables.State)return function()local function F()local F=os.clock()while os.clock()==F do end end it("\099\111\110\115\116\114\117\099\116\115 \097\110 \069\097\115\101\100 \111\098\115\101\114\118\097\098\108\101 \119\105\116\104 \116\104\101 \112\114\111\118\105\100\101\100 \084\119\101\101\110\073\110\102\111",function()local F=s.new(0)local v=TweenInfo.new(1,Enum.EasingStyle.Linear)local L=I.new(F,v);(expect(L)).to.be.ok()end)it("\115\104\111\117\108\100 \117\112\100\097\116\101 \111\117\116\112\117\116 \118\097\108\117\101 \098\097\115\101\100 \111\110 \099\104\097\110\103\101\115 \105\110 \116\104\101 \105\110\112\117\116",function()local v=s.new(0)local L=TweenInfo.new(1,Enum.EasingStyle.Linear)local M=I.new(v,L);(expect(M:Current())).to.equal(0)v:Set(1)F();(expect(M:Current())).to.never.equal(0)end)end
--!strict
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local Eased = require(ReplicatedStorage.Packages.Dex.Observables.Eased)
local State = require(ReplicatedStorage.Packages.Dex.Observables.State)

return function()
    local function waitUntilClockChange()
        local start = os.clock()
        -- selene: allow(empty_loop)
        while os.clock() == start do end
    end

    it("constructs an Eased observable with the provided TweenInfo", function()
        local target = State.new(0)
        local tweenInfo = TweenInfo.new(1, Enum.EasingStyle.Linear)
        local easingObservable = Eased.new(target, tweenInfo)
        expect(easingObservable).to.be.ok()
    end)

    it("should update output value based on changes in the input", function()
        local target = State.new(0)
        local tweenInfo = TweenInfo.new(1, Enum.EasingStyle.Linear)
        local easingObservable = Eased.new(target, tweenInfo)
        expect(easingObservable:Current()).to.equal(0)

        target:Set(1)
        waitUntilClockChange()
        expect(easingObservable:Current()).to.never.equal(0)
    end)
end
