Skip to content

Autogenerated Test File Failing  #727

@mmmmtoasty19

Description

@mmmmtoasty19

Describe the bug

The runtests.jl file is produced when using Genie.Generator.newapp_mvc() is throwing an error when running without making changes to the file. The @includetests macro seems to be failing.

Error stacktrace

ERROR: LoadError: UndefVarError: @includetests not defined in Main
Suggestion: check for spelling errors or missing imports.

To reproduce
Create a new app using Genie.Generator.newapp_mvc()
Create a new resource using SearchLight.Generator.newresource("Test") this creates test_test.jl in the test folder
Open new terminal in test directory of app. Run $julia --project runtests.jl

Expected behavior

Expected test summary.

Changing the runtests.jl file to remove @IncludeTest and instead manually include the test_test.jl file works. and produces the expected outcome

Changed this

@testset ExtendedTestSet "TodoMVC tests" begin
  @includetests ARGS
end

to this

@testset ExtendedTestSet "Test tests" begin
  @testset "tests" begin
    include("tests_test.jl")
  end
end

Test Summary: | Pass Total Time
Test tests | 1 1 2.0s

Additional context
Please include the output of
julia> versioninfo()

Julia Version 1.11.2
Commit 5e9a32e7af (2024-12-01 20:02 UTC)
Build Info:
Official https://julialang.org/ release
Platform Info:
OS: Windows (x86_64-w64-mingw32)
CPU: 12 × 13th Gen Intel(R) Core(TM) i5-1345U
WORD_SIZE: 64
LLVM: libLLVM-16.0.6 (ORCJIT, goldmont)
Threads: 1 default, 0 interactive, 1 GC (on 12 virtual cores)
Environment:
JULIA_EDITOR = code
JULIA_NUM_THREADS =

and
pkg> st


Please answer these optional questions to help us understand, prioritise, and assign the issue

1/ Are you using Genie at work or for hobby/personal projects?

2/ Can you give us, in a few words, some details about the app you're building with Genie?

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions