Delete test/plausible_web/views/stats_view_test.exs with huggingface_hub
Browse files
test/plausible_web/views/stats_view_test.exs
DELETED
|
@@ -1,63 +0,0 @@
|
|
| 1 |
-
defmodule PlausibleWeb.StatsViewTest do
|
| 2 |
-
use PlausibleWeb.ConnCase, async: true
|
| 3 |
-
alias PlausibleWeb.StatsView
|
| 4 |
-
doctest PlausibleWeb.StatsView
|
| 5 |
-
|
| 6 |
-
describe "large_number_format" do
|
| 7 |
-
test "numbers under 1000 stay the same" do
|
| 8 |
-
assert StatsView.large_number_format(100) == "100"
|
| 9 |
-
end
|
| 10 |
-
|
| 11 |
-
test "1000 becomes 1k" do
|
| 12 |
-
assert StatsView.large_number_format(1000) == "1k"
|
| 13 |
-
end
|
| 14 |
-
|
| 15 |
-
test "1111 becomes 1.1k" do
|
| 16 |
-
assert StatsView.large_number_format(1111) == "1.1k"
|
| 17 |
-
end
|
| 18 |
-
|
| 19 |
-
test "10_000 becomes 10k" do
|
| 20 |
-
assert StatsView.large_number_format(10_000) == "10k"
|
| 21 |
-
end
|
| 22 |
-
|
| 23 |
-
test "15_993 becomes 15.9k" do
|
| 24 |
-
assert StatsView.large_number_format(15_923) == "15.9k"
|
| 25 |
-
end
|
| 26 |
-
|
| 27 |
-
test "wat" do
|
| 28 |
-
assert StatsView.large_number_format(49012) == "49k"
|
| 29 |
-
end
|
| 30 |
-
|
| 31 |
-
test "999_999 becomes 999k" do
|
| 32 |
-
assert StatsView.large_number_format(999_999) == "999k"
|
| 33 |
-
end
|
| 34 |
-
|
| 35 |
-
test "1_000_000 becomes 1m" do
|
| 36 |
-
assert StatsView.large_number_format(1_000_000) == "1M"
|
| 37 |
-
end
|
| 38 |
-
|
| 39 |
-
test "2_590_000 becomes 2.5m" do
|
| 40 |
-
assert StatsView.large_number_format(2_590_000) == "2.5M"
|
| 41 |
-
end
|
| 42 |
-
|
| 43 |
-
test "99_999_999 becomes 99.9m" do
|
| 44 |
-
assert StatsView.large_number_format(99_999_999) == "99.9M"
|
| 45 |
-
end
|
| 46 |
-
|
| 47 |
-
test "101_000_000 becomes 101m" do
|
| 48 |
-
assert StatsView.large_number_format(101_000_000) == "101M"
|
| 49 |
-
end
|
| 50 |
-
|
| 51 |
-
test "2_500_000_000 becomes 2.5bn" do
|
| 52 |
-
assert StatsView.large_number_format(2_500_000_000) == "2.5B"
|
| 53 |
-
end
|
| 54 |
-
|
| 55 |
-
test "25_500_000_000 becomes 25bn" do
|
| 56 |
-
assert StatsView.large_number_format(25_500_000_000) == "25.5B"
|
| 57 |
-
end
|
| 58 |
-
|
| 59 |
-
test "250_500_000_000 becomes 250bn" do
|
| 60 |
-
assert StatsView.large_number_format(250_500_000_000) == "250B"
|
| 61 |
-
end
|
| 62 |
-
end
|
| 63 |
-
end
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|