Skip to content

Commit

Permalink
lint & run the linters as part of the unit testing
Browse files Browse the repository at this point in the history
  • Loading branch information
mmomtchev committed Jun 21, 2024
1 parent da71159 commit b19755f
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@
}
],
"scripts": {
"test": "mocha && npm run test:stress 20",
"test": "npm run lint && mocha && npm run test:stress 20",
"bench": "node bench/streams.js",
"lint:cpp": "clang-format -i src/*.cpp src/*.hpp && clang-format -i src/*/*.cpp src/*/*.hpp",
"lint:js": "eslint lib test examples",
Expand Down Expand Up @@ -113,7 +113,7 @@
"documentation-hipster": "^1.0.0",
"documentation-polyglot": "^1.0.1",
"eslint": "^8.15.0",
"eslint-plugin-array-func": "^5.0.1",
"eslint-plugin-array-func": "^4.0.0",
"eslint-plugin-mocha": "^10.1.0",
"eslint-plugin-prefer-arrow": "^1.1.3",
"gh-pages": "^6.1.1",
Expand Down
2 changes: 1 addition & 1 deletion test/api_layer.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -280,7 +280,7 @@ describe('gdal.Layer', () => {
assert.closeTo(actual_envelope.maxY, expected_envelope.maxY, 0.00001)
})
})
it("should throw error if force flag is false and layer doesn't have extent already computed", function() {
it("should throw error if force flag is false and layer doesn't have extent already computed", () => {
// No longer true in GDAL 3.9
if (semver.lt(gdal.version, '3.9.0')) {
const dataset = gdal.open(`${__dirname}/data/park.geo.json`)
Expand Down
2 changes: 1 addition & 1 deletion test/api_rasterband.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -654,7 +654,7 @@ describe('gdal.RasterBand', () => {
ds.rasterSize.x / 2, ds.rasterSize.y / 2, data)
}, /Array length must be greater than/)
})
it('w/file over the 4G elements limit', function() {
it('w/file over the 4G elements limit', function () {
if (semver.gte(process.versions.node, '22.0.0')) {
// It seems that Node.js 22 (V8?) has removed the 32-bit index restrictions
// on TypedArrays
Expand Down
2 changes: 1 addition & 1 deletion test/api_wrapVRT.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ ${Object.keys(metadata).map((k) => ` <MDI key="${k}">${metadata[k]}</MDI>`).j

const bands = ds.bands.map((b) => ({ sources: [ b ] }))

const actual = gdal.wrapVRT({bands})
const actual = gdal.wrapVRT({ bands })

assert.strictEqual(actual, expected)
})
Expand Down

0 comments on commit b19755f

Please sign in to comment.