imported>Mr. Stradivarius
(add some basic smoke tests)
 
(No difference)

Latest revision as of 14:52, 16 Haziran 2020

Documentation for this module may be created at Module:Hatnote list/testcases/doc

local mHatnoteList = require('Module:Hatnote list/sandbox') -- the module to be tested
local ScribuntoUnit = require('Module:ScribuntoUnit')
local suite = ScribuntoUnit:new()

function suite:testAndList()
	self:assertEquals("Foo, Bar, and Baz", mHatnoteList.andList({"Foo", "Bar", "Baz"}))
end

function suite:testOrList()
	self:assertEquals("Foo, Bar, or Baz", mHatnoteList.orList({"Foo", "Bar", "Baz"}))
end

function suite:testForSee()
	self:assertEquals(
		"For Foo, see [[:Bar]]. For Baz, see [[:Qux]].",
		mHatnoteList._forSee({"Foo", "Bar", "Baz", "Qux"})
	)
end

return suite