Skip to content

Commit

Permalink
Strings normalize to fix windows failing tests.
Browse files Browse the repository at this point in the history
  • Loading branch information
LuisMerinoP committed Nov 19, 2023
1 parent 1da1922 commit 55cf89e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Jint.Tests/Runtime/NumberTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,8 @@ public void ParseFloat(string input, double result)
public void ToLocaleString(string parseNumber, string culture, string result)
{
var value = _engine.Evaluate($"({parseNumber}).toLocaleString('{culture}')").AsString();
Assert.Equal(result, value);
// Normalized strings to handle different space characters.
Assert.Equal(result.Normalize(), value.Normalize());

Check failure on line 134 in Jint.Tests/Runtime/NumberTests.cs

View workflow job for this annotation

GitHub Actions / windows

Jint.Tests.Runtime.NumberTests.ToLocaleString(parseNumber: "1000000"

Assert.Equal() Failure: Strings differ ↓ (pos 1) Expected: "1 000 000" Actual: "1 000 000" ↑ (pos 1)

Check failure on line 134 in Jint.Tests/Runtime/NumberTests.cs

View workflow job for this annotation

GitHub Actions / windows

Jint.Tests.Runtime.NumberTests.ToLocaleString(parseNumber: "1e6"

Assert.Equal() Failure: Strings differ ↓ (pos 1) Expected: "1 000 000" Actual: "1 000 000" ↑ (pos 1)
}

Check failure on line 135 in Jint.Tests/Runtime/NumberTests.cs

View workflow job for this annotation

GitHub Actions / windows

Jint.Tests.Runtime.NumberTests.ToLocaleString(parseNumber: "1000000"

Assert.Equal() Failure: Strings differ ↓ (pos 1) Expected: "1 000 000" Actual: "1 000 000" ↑ (pos 1)

Check failure on line 135 in Jint.Tests/Runtime/NumberTests.cs

View workflow job for this annotation

GitHub Actions / windows

Jint.Tests.Runtime.NumberTests.ToLocaleString(parseNumber: "1e6"

Assert.Equal() Failure: Strings differ ↓ (pos 1) Ex Skipped Temporal_Duration_prototype_round [< 1 ms]
}
}

0 comments on commit 55cf89e

Please sign in to comment.