Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Remove code that causes #972. Most likely it will break something else, but this is yet to figure.
- Loading branch information
1 parent
e2ff2ab
commit 7150665
Showing
3 changed files
with
25 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
#!/bin/bash | ||
|
||
# The script runs the regression tests. | ||
# | ||
# It's a part of the test process. | ||
|
||
set -ex | ||
|
||
export PATH="$(yarn bin):$PATH" | ||
|
||
env TZ=America/Sao_Paulo babel-node ./test/regression/972.js |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
// This is a regression test for issue #972: https://github.com/date-fns/date-fns/issues/972 | ||
|
||
import format from '../../src/format' | ||
import assert from 'assert' | ||
|
||
if (process.env.TZ !== 'America/Sao_Paulo') | ||
throw new Error('The test must be run with TZ=America/Sao_Paulo') | ||
|
||
const result = format('2018-11-04', 'yyyy-MM-dd HH:mm') | ||
const expectation = '2018-11-04 01:00' | ||
assert( | ||
result === expectation, | ||
`The result should be equal ${expectation} but got ${result}` | ||
) |