Skip to content

Commit

Permalink
Fix tests and re-enable large example in debug mode
Browse files Browse the repository at this point in the history
  • Loading branch information
JohnnyMorganz committed Jun 22, 2024
1 parent 4d7d972 commit 87f5afe
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 17 deletions.
10 changes: 0 additions & 10 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,16 +21,6 @@ jobs:
- name: Test (Luau)
run: cargo test --features luau

# TODO: ideally this step isn't needed, but we have to gate some tests behind release mode
# we do this to ensure they still run in CI
# https://github.com/Kampfkarren/full-moon/issues/140
test_luau_release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Test (Luau - Release mode)
run: cargo test --features luau --release

test_lua52:
runs-on: ubuntu-latest
steps:
Expand Down
4 changes: 0 additions & 4 deletions tests/test_ranges.rs
Original file line number Diff line number Diff line change
Expand Up @@ -92,10 +92,6 @@ fn test_incomplete_range() {
}

#[test]
#[cfg_attr(
all(debug_assertions, feature = "luau"),
ignore = "fails in debug mode" // TODO: https://github.com/Kampfkarren/full-moon/issues/140
)]
fn test_large_example() {
insta::assert_snapshot!(
format(
Expand Down
6 changes: 3 additions & 3 deletions tests/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ use stylua_lib::{
SortRequiresConfig,
};

fn format(input: &str, lua_version: LuaVersion) -> String {
fn format(input: &str, syntax: LuaVersion) -> String {
let config = Config {
lua_version,
syntax,
..Config::default()
};
format_code(input, config, None, OutputVerification::None).unwrap()
Expand Down Expand Up @@ -110,7 +110,7 @@ fn test_collapse_single_statement_lua_52() {
end
"###,
Config {
lua_version: LuaVersion::Lua52,
syntax: LuaVersion::Lua52,
collapse_simple_statement: CollapseSimpleStatement::Always,
..Config::default()
},
Expand Down

0 comments on commit 87f5afe

Please sign in to comment.