This commit is contained in:
lx
2026-07-06 14:01:11 -04:00
commit c4f97d729d
16468 changed files with 935321 additions and 0 deletions
@@ -0,0 +1,30 @@
return function()
local CorePackages = game:GetService("CorePackages")
local ReceivedUserCountryCode = require(CorePackages.AppTempCommon.LuaApp.Actions.ReceivedUserCountryCode)
local CountryCodeReducer = require(CorePackages.AppTempCommon.LuaApp.Reducers.CountryCode)
describe("CountryCode", function()
it("should be and empty string by default", function()
local state = CountryCodeReducer(nil, {})
expect(state).to.equal("")
end)
it("should not be modified by other actions", function()
local oldState = CountryCodeReducer(nil, {})
local newState = CountryCodeReducer(oldState, { type = "not a real action" })
expect(newState).to.equal(oldState)
end)
it("should be changed using ReceivedUserCountryCode", function()
local state = CountryCodeReducer(nil, {})
state = CountryCodeReducer(state, ReceivedUserCountryCode("US"))
expect(state).to.equal("US")
state = CountryCodeReducer(state, ReceivedUserCountryCode(""))
expect(state).to.equal("")
end)
end)
end