Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

'make test' and 'make lint' show errors after fresh clone on system

Đang mở
#313 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

Đánh giá

Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức phù hợp với người mới
25/100
Loại issue
Lỗi
Độ rõ ràng
Cần làm rõ
Mức độ hoạt động
Đình trệ
Công nghệ
javascript, node.js

Hướng nghiên cứu

Bắt đầu bằng cách tái hiện các Make target với Node 4.4.1 được báo cáo và kiểm tra test/test-bettererrors.js cùng test/test-runfiles.js để tìm hai assertion bị lỗi. Sau đó xem lại lệnh gọi nodelint được hiển thị bởi make lint. Công việc được hoàn tất khi make test và make lint hoàn thành thành công trên thiết lập clone mới được hỗ trợ.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

Hello,
I recently cloned the repository and run the commands 'make test' and 'make lint'. Both the commands show errors :
Output of both the commands,

prateek@prateek:~/codes/nodeunit$ make test
node ./bin/nodeunit test

test-base
✔ testCalled
✔ testOk
✔ testEquals
✔ testSame
✔ testEqual
✔ testNotEqual
✔ testDeepEqual
✔ testNotDeepEqual
✔ testStrictEqual
✔ testNotStrictEqual
✔ testThrows
✔ testThrowsWithReGex
✔ testThrowsWithErrorValidation
✔ testDoesNotThrows
✔ testIfError
✔ testExpect

test-bettererrors
✖ testEqual

AssertionError: expected [String: 'AssertionError\n at Object.exports.testEqual (/home/prateek/codes/nodeunit/test/test-bettererrors.js:29:16)\n at Object. (/home/prateek/codes/nodeunit/lib/core.js:236:16)\n at /home/prateek/codes/nodeunit/lib/core.js:236:16\n at Object.exports.runTest (/home/prateek/codes/nodeunit/lib/core.js:70:9)\n at /home/prateek/codes/nodeunit/lib/core.js:118:25\n at /home/prateek/codes/nodeunit/deps/async.js:513:13\n at iterate (/home/prateek/codes/nodeunit/deps/async.js:123:13)\n at async.forEachSeries (/home/prateek/codes/nodeunit/deps/async.js:139:9)\n at _concat (/home/prateek/codes/nodeunit/deps/async.js:512:9)\n at Object.concatSeries (/home/prateek/codes/nodeunit/deps/async.js:152:23)'] to include 'true'
at Object.Assertion.include (/home/prateek/codes/nodeunit/node_modules/should/lib/should.js:479:10)
at Object.exports.testEqual (/home/prateek/codes/nodeunit/test/test-bettererrors.js:33:34)
at Object. (/home/prateek/codes/nodeunit/lib/core.js:236:16)
at /home/prateek/codes/nodeunit/lib/core.js:236:16
at Object.exports.runTest (/home/prateek/codes/nodeunit/lib/core.js:70:9)
at /home/prateek/codes/nodeunit/lib/core.js:118:25
at /home/prateek/codes/nodeunit/deps/async.js:513:13
at iterate (/home/prateek/codes/nodeunit/deps/async.js:123:13)
at async.forEachSeries (/home/prateek/codes/nodeunit/deps/async.js:139:9)
at _concat (/home/prateek/codes/nodeunit/deps/async.js:512:9)

✔ testAssertThrows
✔ testErrorIsNotAssertion

test-cli
✔ run test suite using absolute path

test-failing-callbacks
✔ testFailingLog
✔ testFailingTestDone
✔ testAssertionObj
✔ testLogOptional
✔ testExpectWithFailure

test-httputil
(node) http.createClient is deprecated. Use http.request instead.
✔ testHttpUtilBasics
✔ testHttpUtilJsonHandling

test-runfiles
✔ testRunFiles
✔ testRunFilesEmpty
✖ testEmptyDir

TypeError: path.exists is not a function
at Object.exports.testEmptyDir (/home/prateek/codes/nodeunit/test/test-runfiles.js:119:10)
at Object. (/home/prateek/codes/nodeunit/lib/core.js:236:16)
at /home/prateek/codes/nodeunit/lib/core.js:236:16
at Object.exports.runTest (/home/prateek/codes/nodeunit/lib/core.js:70:9)
at /home/prateek/codes/nodeunit/lib/core.js:118:25
at /home/prateek/codes/nodeunit/deps/async.js:513:13
at iterate (/home/prateek/codes/nodeunit/deps/async.js:123:13)
at /home/prateek/codes/nodeunit/deps/async.js:134:25
at /home/prateek/codes/nodeunit/deps/async.js:515:17
at Immediate._onImmediate (/home/prateek/codes/nodeunit/lib/types.js:146:17)

test-runmodule
✔ testRunModule
✔ testRunModuleTestSpec
✔ testRunModuleEmpty
✔ testNestedTests

test-runtest
✔ testArgs
✔ testDoneCallback
✔ testThrowError

test-sandbox
✔ testSimpleSandbox
✔ testSandboxContext
✔ testSandboxMultiple

test-testcase
✔ testTestCase
✔ tearDownAfterError
✔ catchSetUpError
✔ setUpErrorCallback
✔ catchTearDownError
✔ tearDownErrorCallback
✔ testErrorAndtearDownError
✔ testCaseGroups
✔ nestedTestCases
✔ deepNestedTestCases

test-testcase-legacy
✔ testTestCase
✔ tearDownAfterError
✔ catchSetUpError
✔ setUpErrorCallback
✔ catchTearDownError
✔ tearDownErrorCallback
✔ testErrorAndtearDownError
✔ testCaseGroups
✔ nestedTestCases
✔ deepNestedTestCases

FAILURES: 2/217 assertions failed (276ms)
make: *** [test] Error 1

prateek@prateek:~/codes/nodeunit$ make lint
nodelint --config nodelint.cfg ./index.js ./bin/nodeunit ./bin/nodeunit.json ./lib/.js ./lib/reporters/.js ./test/*.js
undefined:2557
s.string = s;
^

TypeError: Cannot assign to read only property 'string' of (begin)
at ultimate (eval at (/opt/node/lib/node_modules/nodelint/nodelint:46:11), :2557:18)
at eval (eval at (/opt/node/lib/node_modules/nodelint/nodelint:46:11), :3167:5)
at eval (eval at (/opt/node/lib/node_modules/nodelint/nodelint:46:11), :6399:2)
at /opt/node/lib/node_modules/nodelint/nodelint:46:3
at Object. (/opt/node/lib/node_modules/nodelint/nodelint:194:2)
at Module._compile (module.js:409:26)
at Object.Module._extensions..js (module.js:416:10)
at Module.load (module.js:343:32)
at Function.Module._load (module.js:300:12)
at Function.Module.runMain (module.js:441:10)
make: *** [lint] Error 1

System configuration :
Ubuntu 14.04, 64 bit

Node version : 4.4.1
NPM version : 2.14.20

Ngôn ngữ chính
JavaScript
Star
1.9k
Fork
359
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Chuẩn bị môi trường

Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của caolan/nodeunit

Tất cả issue của caolan/nodeunit

Issue tương tự

Thêm issue về JavaScript

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.