Skip to content

Commit

Permalink
test: add more edge cases
Browse files Browse the repository at this point in the history
  • Loading branch information
sheerlox committed Dec 27, 2024
1 parent 4852ad5 commit 2d1fdac
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 2 deletions.
5 changes: 3 additions & 2 deletions lib/modules/manager/mix/__fixtures__/mix.exs
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ defmodule MyProject.MixProject do
{:secret, "~> 1.0", organization: "acme"},
{:also_secret, "~> 1.0", only: [:dev, :test], organization: "acme", runtime: false},
{:metrics, ">0.2.0 and <=1.0.0"},
{:jason, ">= 1.0.0"},
{:jason, ">= 1.0.0", only: :prod},
{:hackney, "~> 1.0",
optional: true},
{:hammer_backend_redis, "~> 6.1", only: [:dev, :prod, :test]},
Expand All @@ -38,7 +38,8 @@ defmodule MyProject.MixProject do
[:test,
# prod,
:dev],
runtime: false}
runtime: false},
{:floki, "== 0.37.0", only: :test},
]
end
end
1 change: 1 addition & 0 deletions lib/modules/manager/mix/__fixtures__/mix.lock
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
"secret": {:hex, :secret, "1.5.0", "344dbbf6610d205760ec37e2848bff2aab5a2de182bb5cdaa72cc2fd19d74535", [:mix], [{:decimal, "~> 1.0", [hex: :decimal, repo: "hexpm", optional: false]}], "hexpm", "19c205c8de0e2e5817f2250100281c58e717cb11ff1bb410bf661ee78c24e79b"},
"also_secret": {:hex, :also_secret, "1.3.4", "344dbbf6610d205760ec37e2848bff2aab5a2de182bb5cdaa72cc2fd19d74535", [:mix], [{:decimal, "~> 1.0", [hex: :decimal, repo: "hexpm", optional: false]}], "hexpm", "19c205c8de0e2e5817f2250100281c58e717cb11ff1bb410bf661ee78c24e79b"},
"file_system": {:hex, :file_system, "1.0.1", "79e8ceaddb0416f8b8cd02a0127bdbababe7bf4a23d2a395b983c1f8b3f73edd", [:mix], [], "hexpm", "4414d1f38863ddf9120720cd976fce5bdde8e91d8283353f0e31850fa89feb9e"},
"floki": {:hex, :floki, "0.37.0", "b83e0280bbc6372f2a403b2848013650b16640cd2470aea6701f0632223d719e", [:mix], [], "hexpm", "516a0c15a69f78c47dc8e0b9b3724b29608aa6619379f91b1ffa47109b5d0dd3"},
"gun": {:hex, :grpc_gun, "2.0.1", "221b792df3a93e8fead96f697cbaf920120deacced85c6cd3329d2e67f0871f8", [:rebar3], [{:cowlib, "~> 2.11", [hex: :cowlib, repo: "hexpm", optional: false]}], "hexpm", "795a65eb9d0ba16697e6b0e1886009ce024799e43bb42753f0c59b029f592831"},
"hackney": {:hex, :hackney, "1.20.1", "8d97aec62ddddd757d128bfd1df6c5861093419f8f7a4223823537bad5d064e2", [:rebar3], [{:certifi, "~> 2.12.0", [hex: :certifi, repo: "hexpm", optional: false]}, {:idna, "~> 6.1.0", [hex: :idna, repo: "hexpm", optional: false]}, {:metrics, "~> 1.0.0", [hex: :metrics, repo: "hexpm", optional: false]}, {:mimerl, "~> 1.1", [hex: :mimerl, repo: "hexpm", optional: false]}, {:parse_trans, "3.4.1", [hex: :parse_trans, repo: "hexpm", optional: false]}, {:ssl_verify_fun, "~> 1.1.0", [hex: :ssl_verify_fun, repo: "hexpm", optional: false]}, {:unicode_util_compat, "~> 0.7.0", [hex: :unicode_util_compat, repo: "hexpm", optional: false]}], "hexpm", "fe9094e5f1a2a2c0a7d10918fee36bfec0ec2a979994cff8cfe8058cd9af38e3"},
"hammer": {:hex, :hammer, "6.2.1", "5ae9c33e3dceaeb42de0db46bf505bd9c35f259c8defb03390cd7556fea67ee2", [:mix], [{:poolboy, "~> 1.5", [hex: :poolboy, repo: "hexpm", optional: false]}], "hexpm", "b9476d0c13883d2dc0cc72e786bac6ac28911fba7cc2e04b70ce6a6d9c4b2bdc"},
Expand Down
18 changes: 18 additions & 0 deletions lib/modules/manager/mix/extract.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,14 @@ describe('modules/manager/mix/extract', () => {
depType: 'devDependencies',
packageName: "credo",
},
{
currentValue: "== 0.37.0",
currentVersion: "0.37.0",
datasource: "hex",
depName: "floki",
depType: "devDependencies",
packageName: "floki",
},
]);
});

Expand Down Expand Up @@ -256,6 +264,16 @@ describe('modules/manager/mix/extract', () => {
depType: 'devDependencies',
packageName: "credo",
lockedVersion: "1.7.10",

},
{
currentValue: "== 0.37.0",
currentVersion: "0.37.0",
datasource: "hex",
depName: "floki",
depType: "devDependencies",
lockedVersion: "0.37.0",
packageName: "floki",
},
]);
});
Expand Down

0 comments on commit 2d1fdac

Please sign in to comment.