Skip to content

Stabilize pre-1970 setYear test#2464

Merged
lahma merged 1 commit into
sebastienros:mainfrom
nfcampos:nc/date-test-utc
May 14, 2026
Merged

Stabilize pre-1970 setYear test#2464
lahma merged 1 commit into
sebastienros:mainfrom
nfcampos:nc/date-test-utc

Conversation

@nfcampos

@nfcampos nfcampos commented May 11, 2026

Copy link
Copy Markdown
Contributor

Summary

Pin the pre-1970 setYear test to UTC.

Details

  • Run ShouldSetYearBefore1970 with an explicit UTC local timezone.
  • Avoid dependence on the machine default timezone when asserting the resulting ISO timestamp.
  • Leave runtime date behavior unchanged; this is a test-only stability fix.

Linked issue

Refs #

Test plan

  • Added or updated unit tests in Jint.Tests
  • Ran dotnet test --configuration Release locally
  • For ECMAScript spec changes: ran Jint.Tests.Test262 and confirmed no regressions
  • For interop changes: covered in Jint.Tests/Runtime/Interop
  • For perf changes: included before/after numbers from Jint.Benchmark

Additional local validation:

  • dotnet test Jint.Tests/Jint.Tests.csproj --filter "FullyQualifiedName~EngineTests.ShouldSetYearBefore1970"

Breaking change?

No.

## Summary

Pin the pre-1970 setYear test to UTC.

## Details

- Run ShouldSetYearBefore1970 with an explicit UTC local timezone.
- Avoid dependence on the machine default timezone when asserting the resulting ISO timestamp.
- Leave runtime date behavior unchanged; this is a test-only stability fix.

## Linked issue

Refs #

## Test plan

- [x] Added or updated unit tests in Jint.Tests
- [ ] Ran dotnet test --configuration Release locally
- [ ] For ECMAScript spec changes: ran Jint.Tests.Test262 and confirmed no regressions
- [ ] For interop changes: covered in Jint.Tests/Runtime/Interop
- [ ] For perf changes: included before/after numbers from Jint.Benchmark

Additional local validation:

- dotnet test Jint.Tests/Jint.Tests.csproj --filter "FullyQualifiedName~EngineTests.ShouldSetYearBefore1970"

## Breaking change?

No.
@lahma
lahma force-pushed the nc/date-test-utc branch from 4961e39 to 8c15bd0 Compare May 14, 2026 07:10
@lahma
lahma enabled auto-merge (squash) May 14, 2026 07:11
@lahma
lahma merged commit c59c46e into sebastienros:main May 14, 2026
4 checks passed
@nfcampos
nfcampos deleted the nc/date-test-utc branch May 14, 2026 09:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants