1---
2source: tests/tests.rs
3expression: format(&contents)
4
5---
6function foo(defaultExport)
7	if defaultExport == nil then
8		print(
9			"lazy: Expected the result of a dynamic import() call. "
10				.. "Instead received: %s\n\nYour code should look like: \n  "
11				-- Break up imports to avoid accidentally parsing them as dependencies.
12				-- ROBLOX deviation: Lua syntax in message
13				.. "local MyComponent = lazy(function() => req"
14				.. "quire('script.Parent.MyComponent') end)",
15			moduleObject
16		)
17	end
18end
19
20function bar(defaultExport)
21	if defaultExport == nil then
22		print(
23			"lazy: Expected the result of a dynamic import() call. "
24				.. "Instead received: %s\n\nYour code should look like: \n  "
25				-- Break up imports to avoid accidentally parsing them as dependencies.
26				-- ROBLOX deviation: Lua syntax in message
27				.. "local MyComponent = lazy(function() => req"
28				.. "quire('script.Parent.MyComponent') end)",
29			moduleObject
30		)
31	end
32end
33
34