Skip to content

Commit

Permalink
Use ISO time for snapshot tests (#908)
Browse files Browse the repository at this point in the history
Fixes tests failing after enough time has passed.

ref: #904 (comment)
  • Loading branch information
spenserblack committed Dec 28, 2022
1 parent 71bfde0 commit fdb42e6
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions tests/repo.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ fn test_repo() -> Result<()> {
let repo = repo("repo.sh")?;
let config: Config = Config {
input: repo.path().to_path_buf(),
iso_time: true,
..Default::default()
};
let info = Info::new(&config)?;
Expand Down
4 changes: 2 additions & 2 deletions tests/snapshots/repo__repo.snap
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ expression: info
]
},
"version": "tag1",
"created": "22 years ago",
"created": "2000-01-02T00:00:00Z",
"languages": [
{
"language": "Rust",
Expand Down Expand Up @@ -46,7 +46,7 @@ expression: info
"contribution": 25
}
],
"lastChange": "22 years ago",
"lastChange": "2000-01-02T00:00:00Z",
"contributors": 4,
"repoUrl": "https://github.com/user/repo.git",
"numberOfCommits": 4,
Expand Down

0 comments on commit fdb42e6

Please sign in to comment.