Skip to content

regenerate test outputs? #92

@secona

Description

@secona

#84 highlights the problem of poorly generated test outputs.

In some tests as well, we have JSON keys that are ordered alphabetically and some not. See below for snippets. This can make it hard to see the diff when introducing large changes. Should we regenerate all the tests outputs?

assert_e2e().eq(
latest_lock,
str![[r#"
[
{
"reason": "lockfile",
"version": null
},
{
"reason": "locked-package",
"id": "registry+https://github.com/rust-lang/crates.io-index#[email protected]",
"checksum": "3a351dafbc8a3a9cba7c06dfe8caa11a3a45f800a336bb5b913a8f1e2652d454"
},
{
"reason": "locked-package",
"id": "[email protected]",
"dependencies": [
"a"
]
}
]
"#]]

assert_e2e().eq(
latest_lock,
str![[r#"
[
{
"reason": "lockfile",
"version": 4
},
{
"checksum": "3a351dafbc8a3a9cba7c06dfe8caa11a3a45f800a336bb5b913a8f1e2652d454",
"id": "registry+https://github.com/rust-lang/crates.io-index#[email protected]",
"reason": "locked-package"
},
{
"dependencies": [
"a"
],
"id": "[email protected]",
"reason": "locked-package"
}
]
"#]]
.is_json()
.against_jsonlines(),
);

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions