Skip to content

Commit be0ce67

Browse files
committed
Adds compulsory test coverage, fix tests
1 parent 6da020a commit be0ce67

File tree

12 files changed

+178
-63
lines changed

12 files changed

+178
-63
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ bin/*
88
backend/config.json
99
backend/embed/assets
1010
backend/.task
11+
backend/coverage.out
1112
backend/coverage.html
1213
test/node_modules
1314
*/node_modules

backend/.testcoverage.yml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
---
2+
3+
# (mandatory)
4+
# Path to coverprofile file (output of `go test -coverprofile` command).
5+
profile: coverage.out
6+
7+
# (optional; but recommended to set)
8+
# When specified reported file paths will not contain local prefix in the output
9+
local-prefix: "npm"
10+
11+
# Holds coverage thresholds percentages, values should be in range [0-100]
12+
threshold:
13+
# (optional; default 0)
14+
# The minimum coverage that each file should have
15+
# file: 70
16+
# (optional; default 0)
17+
# The minimum coverage that each package should have
18+
# package: 30
19+
# (optional; default 0)
20+
# The minimum total coverage project should have
21+
total: 34

backend/go.mod

Lines changed: 33 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -3,80 +3,84 @@ module npm
33
go 1.20
44

55
require (
6-
github.com/DATA-DOG/go-sqlmock v1.5.0
6+
github.com/DATA-DOG/go-sqlmock v1.5.2
77
github.com/alexflint/go-arg v1.4.3
88
github.com/amacneil/dbmate/v2 v2.3.0
99
github.com/aymerick/raymond v2.0.3-0.20180322193309-b565731e1464+incompatible
1010
github.com/dgrijalva/jwt-go v3.2.0+incompatible
1111
github.com/drexedam/gravatar v0.0.0-20210327211422-e94eea8c338e
12-
github.com/fatih/color v1.15.0
13-
github.com/glebarez/sqlite v1.9.0
14-
github.com/go-chi/chi/v5 v5.0.10
12+
github.com/fatih/color v1.16.0
13+
github.com/glebarez/sqlite v1.11.0
14+
github.com/go-chi/chi/v5 v5.0.12
1515
github.com/go-chi/cors v1.2.1
16-
github.com/go-chi/jwtauth/v5 v5.1.1
16+
github.com/go-chi/jwtauth/v5 v5.3.1
1717
github.com/jc21/go-sse v0.0.0-20230307071053-2e6b1dbcb7ec
1818
github.com/jc21/jsref v0.0.0-20210608024405-a97debfc4760
1919
github.com/patrickmn/go-cache v2.1.0+incompatible
2020
github.com/qri-io/jsonschema v0.2.1
2121
github.com/rotisserie/eris v0.5.4
22-
github.com/stretchr/testify v1.8.4
22+
github.com/stretchr/testify v1.9.0
2323
github.com/vrischmann/envconfig v1.3.0
2424
go.uber.org/goleak v1.3.0
25-
golang.org/x/crypto v0.11.0
25+
golang.org/x/crypto v0.23.0
2626
gorm.io/datatypes v1.2.0
27-
gorm.io/driver/mysql v1.5.1
28-
gorm.io/driver/postgres v1.5.2
29-
gorm.io/gorm v1.25.2
27+
gorm.io/driver/mysql v1.5.6
28+
gorm.io/driver/postgres v1.5.7
29+
gorm.io/gorm v1.25.10
3030
gorm.io/plugin/soft_delete v1.2.1
3131
)
3232

3333
require (
34+
filippo.io/edwards25519 v1.1.0 // indirect
3435
github.com/alexflint/go-scalar v1.2.0 // indirect
3536
github.com/davecgh/go-spew v1.1.1 // indirect
36-
github.com/decred/dcrd/dcrec/secp256k1/v4 v4.2.0 // indirect
37+
github.com/decred/dcrd/dcrec/secp256k1/v4 v4.3.0 // indirect
3738
github.com/dustin/go-humanize v1.0.1 // indirect
38-
github.com/glebarez/go-sqlite v1.21.2 // indirect
39-
github.com/go-sql-driver/mysql v1.7.1 // indirect
39+
github.com/glebarez/go-sqlite v1.22.0 // indirect
40+
github.com/go-sql-driver/mysql v1.8.1 // indirect
4041
github.com/goccy/go-json v0.10.2 // indirect
41-
github.com/google/uuid v1.3.0 // indirect
42+
github.com/google/uuid v1.6.0 // indirect
4243
github.com/jackc/pgpassfile v1.0.0 // indirect
43-
github.com/jackc/pgservicefile v0.0.0-20221227161230-091c0ba34f0a // indirect
44-
github.com/jackc/pgx/v5 v5.4.2 // indirect
44+
github.com/jackc/pgservicefile v0.0.0-20231201235250-de7065d80cb9 // indirect
45+
github.com/jackc/pgx/v5 v5.5.5 // indirect
46+
github.com/jackc/puddle/v2 v2.2.1 // indirect
4547
github.com/jinzhu/inflection v1.0.0 // indirect
4648
github.com/jinzhu/now v1.1.5 // indirect
4749
github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51 // indirect
48-
github.com/lestrrat-go/blackmagic v1.0.1 // indirect
50+
github.com/lestrrat-go/blackmagic v1.0.2 // indirect
4951
github.com/lestrrat-go/httpcc v1.0.1 // indirect
50-
github.com/lestrrat-go/httprc v1.0.4 // indirect
52+
github.com/lestrrat-go/httprc v1.0.5 // indirect
5153
github.com/lestrrat-go/iter v1.0.2 // indirect
5254
github.com/lestrrat-go/jspointer v0.0.0-20181205001929-82fadba7561c // indirect
53-
github.com/lestrrat-go/jwx/v2 v2.0.11 // indirect
55+
github.com/lestrrat-go/jwx/v2 v2.0.21 // indirect
5456
github.com/lestrrat-go/option v1.0.1 // indirect
5557
github.com/lestrrat-go/pdebug/v3 v3.0.1 // indirect
5658
github.com/lestrrat-go/structinfo v0.0.0-20210312050401-7f8bd69d6acb // indirect
5759
github.com/lib/pq v1.10.9 // indirect
5860
github.com/mattn/go-colorable v0.1.13 // indirect
59-
github.com/mattn/go-isatty v0.0.19 // indirect
61+
github.com/mattn/go-isatty v0.0.20 // indirect
62+
github.com/ncruces/go-strftime v0.1.9 // indirect
6063
github.com/pkg/errors v0.9.1 // indirect
6164
github.com/pmezard/go-difflib v1.0.0 // indirect
6265
github.com/qri-io/jsonpointer v0.1.1 // indirect
6366
github.com/remyoudompheng/bigfft v0.0.0-20230129092748-24d4a6f8daec // indirect
6467
github.com/rogpeppe/go-internal v1.10.0 // indirect
6568
github.com/segmentio/asm v1.2.0 // indirect
66-
golang.org/x/mod v0.12.0 // indirect
67-
golang.org/x/sys v0.10.0 // indirect
68-
golang.org/x/text v0.11.0 // indirect
69-
golang.org/x/tools v0.11.0 // indirect
69+
golang.org/x/mod v0.17.0 // indirect
70+
golang.org/x/sync v0.7.0 // indirect
71+
golang.org/x/sys v0.20.0 // indirect
72+
golang.org/x/text v0.15.0 // indirect
73+
golang.org/x/tools v0.21.0 // indirect
7074
gopkg.in/yaml.v3 v3.0.1 // indirect
7175
lukechampine.com/uint128 v1.3.0 // indirect
7276
modernc.org/cc/v3 v3.41.0 // indirect
73-
modernc.org/ccgo/v3 v3.16.14 // indirect
74-
modernc.org/libc v1.24.1 // indirect
77+
modernc.org/ccgo/v3 v3.17.0 // indirect
78+
modernc.org/libc v1.50.5 // indirect
7579
modernc.org/mathutil v1.6.0 // indirect
76-
modernc.org/memory v1.6.0 // indirect
80+
modernc.org/memory v1.8.0 // indirect
7781
modernc.org/opt v0.1.3 // indirect
78-
modernc.org/sqlite v1.23.1 // indirect
79-
modernc.org/strutil v1.1.3 // indirect
82+
modernc.org/sqlite v1.28.0 // indirect
83+
modernc.org/strutil v1.2.0 // indirect
8084
modernc.org/token v1.1.0 // indirect
8185
)
8286

0 commit comments

Comments
 (0)