Guest User

Untitled

a guest
Jul 6th, 2020
31
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 52.46 KB | None | 0 0
  1. terencedignon-macbookpro2% yarn test
  2. yarn run v1.22.4
  3. $ jest
  4. PASS test/utils/npm/get-npm-bin-command.test.js
  5. PASS test/utils/command-exists.test.js
  6. PASS test/utils/npm/use-yarn.test.js
  7. PASS test/github/api.test.js
  8. ● Console
  9.  
  10. console.log
  11. Creating GitHub check with 0 annotations for check-name…
  12.  
  13. at log (src/utils/action.js:19:12)
  14.  
  15. console.log
  16. check-name check created successfully
  17.  
  18. at log (src/utils/action.js:19:12)
  19.  
  20. PASS test/github/context.test.js
  21. /bin/sh: black: command not found
  22. /bin/sh: black: command not found
  23. /bin/sh: black: command not found
  24. error Command "eslint" not found.
  25. error Command "eslint" not found.
  26. error Command "eslint" not found.
  27. error Command "eslint" not found.
  28. error Command "eslint" not found.
  29. error Command "eslint" not found.
  30. /bin/sh: flake8: command not found
  31. /bin/sh: flake8: command not found
  32. /bin/sh: flake8: command not found
  33. /bin/sh: gofmt: command not found
  34. /bin/sh: gofmt: command not found
  35. /bin/sh: golint: command not found
  36. /bin/sh: golint: command not found
  37. /bin/sh: mypy: command not found
  38. /bin/sh: mypy: command not found
  39. error Command "prettier" not found.
  40. error Command "prettier" not found.
  41. error Command "prettier" not found.
  42. /bin/sh: rubocop: command not found
  43. /bin/sh: rubocop: command not found
  44. /bin/sh: rubocop: command not found
  45. error Command "stylelint" not found.
  46. error Command "stylelint" not found.
  47. error Command "stylelint" not found.
  48. error Command "xo" not found.
  49. error Command "xo" not found.
  50. error Command "xo" not found.
  51. /bin/sh: swiftformat: command not found
  52. /bin/sh: swiftformat: command not found
  53. /bin/sh: swiftlint: command not found
  54. /bin/sh: swiftlint: command not found
  55. FAIL test/linters/linters.test.js (10.729 s)
  56. ● Console
  57.  
  58. console.warn
  59. Flake8 does not support auto-fixing
  60.  
  61. 14 | break;
  62. 15 | case "warning":
  63. > 16 | console.warn(msg); // eslint-disable-line no-console
  64. | ^
  65. 17 | break;
  66. 18 | default:
  67. 19 | console.log(msg); // eslint-disable-line no-console
  68.  
  69. at log (src/utils/action.js:16:12)
  70. at Function.lint (src/linters/flake8.js:48:4)
  71. at Object.<anonymous> (test/linters/linters.test.js:66:30)
  72.  
  73. console.warn
  74. golint does not support auto-fixing
  75.  
  76. 14 | break;
  77. 15 | case "warning":
  78. > 16 | console.warn(msg); // eslint-disable-line no-console
  79. | ^
  80. 17 | break;
  81. 18 | default:
  82. 19 | console.log(msg); // eslint-disable-line no-console
  83.  
  84. at log (src/utils/action.js:16:12)
  85. at Function.lint (src/linters/golint.js:42:4)
  86. at Object.<anonymous> (test/linters/linters.test.js:66:30)
  87.  
  88. console.warn
  89. Mypy does not support auto-fixing
  90.  
  91. 14 | break;
  92. 15 | case "warning":
  93. > 16 | console.warn(msg); // eslint-disable-line no-console
  94. | ^
  95. 17 | break;
  96. 18 | default:
  97. 19 | console.log(msg); // eslint-disable-line no-console
  98.  
  99. at log (src/utils/action.js:16:12)
  100. at Function.lint (src/linters/mypy.js:49:4)
  101. at Object.<anonymous> (test/linters/linters.test.js:66:30)
  102.  
  103. ● black › lint › Black returns expected lint output
  104.  
  105. expect(received).resolves.toEqual()
  106.  
  107. Received promise rejected instead of resolved
  108. Rejected to value: [Error: Black is not installed]
  109.  
  110. 52 |
  111. 53 | beforeAll(async () => {
  112. > 54 | await expect(linter.verifySetup(projectTmpDir)).resolves.toEqual(undefined);
  113. | ^
  114. 55 | });
  115. 56 |
  116. 57 | // Test lint and auto-fix modes
  117.  
  118. at expect (node_modules/expect/build/index.js:134:15)
  119. at Object.<anonymous> (test/linters/linters.test.js:54:10)
  120.  
  121. ● black › lint › Black returns expected lint output
  122.  
  123. expect(received).toEqual(expected) // deep equality
  124.  
  125. Expected: 1
  126. Received: 127
  127.  
  128. 67 |
  129. 68 | // Exit code
  130. > 69 | expect(cmdOutput.status).toEqual(expected.cmdOutput.status);
  131. | ^
  132. 70 |
  133. 71 | // stdout
  134. 72 | const stdout = normalizeDates(cmdOutput.stdout);
  135.  
  136. at Object.<anonymous> (test/linters/linters.test.js:69:30)
  137.  
  138. ● black › lint › Black parses lint output correctly
  139.  
  140. expect(received).resolves.toEqual()
  141.  
  142. Received promise rejected instead of resolved
  143. Rejected to value: [Error: Black is not installed]
  144.  
  145. 52 |
  146. 53 | beforeAll(async () => {
  147. > 54 | await expect(linter.verifySetup(projectTmpDir)).resolves.toEqual(undefined);
  148. | ^
  149. 55 | });
  150. 56 |
  151. 57 | // Test lint and auto-fix modes
  152.  
  153. at expect (node_modules/expect/build/index.js:134:15)
  154. at Object.<anonymous> (test/linters/linters.test.js:54:10)
  155.  
  156. ● black › auto-fix › Black returns expected auto-fix output
  157.  
  158. expect(received).resolves.toEqual()
  159.  
  160. Received promise rejected instead of resolved
  161. Rejected to value: [Error: Black is not installed]
  162.  
  163. 52 |
  164. 53 | beforeAll(async () => {
  165. > 54 | await expect(linter.verifySetup(projectTmpDir)).resolves.toEqual(undefined);
  166. | ^
  167. 55 | });
  168. 56 |
  169. 57 | // Test lint and auto-fix modes
  170.  
  171. at expect (node_modules/expect/build/index.js:134:15)
  172. at Object.<anonymous> (test/linters/linters.test.js:54:10)
  173.  
  174. ● black › auto-fix › Black returns expected auto-fix output
  175.  
  176. expect(received).toEqual(expected) // deep equality
  177.  
  178. Expected: 0
  179. Received: 127
  180.  
  181. 67 |
  182. 68 | // Exit code
  183. > 69 | expect(cmdOutput.status).toEqual(expected.cmdOutput.status);
  184. | ^
  185. 70 |
  186. 71 | // stdout
  187. 72 | const stdout = normalizeDates(cmdOutput.stdout);
  188.  
  189. at Object.<anonymous> (test/linters/linters.test.js:69:30)
  190.  
  191. ● black › auto-fix › Black parses auto-fix output correctly
  192.  
  193. expect(received).resolves.toEqual()
  194.  
  195. Received promise rejected instead of resolved
  196. Rejected to value: [Error: Black is not installed]
  197.  
  198. 52 |
  199. 53 | beforeAll(async () => {
  200. > 54 | await expect(linter.verifySetup(projectTmpDir)).resolves.toEqual(undefined);
  201. | ^
  202. 55 | });
  203. 56 |
  204. 57 | // Test lint and auto-fix modes
  205.  
  206. at expect (node_modules/expect/build/index.js:134:15)
  207. at Object.<anonymous> (test/linters/linters.test.js:54:10)
  208.  
  209. ● eslint › lint › ESLint returns expected lint output
  210.  
  211. expect(received).resolves.toEqual()
  212.  
  213. Received promise rejected instead of resolved
  214. Rejected to value: [Error: ESLint is not installed]
  215.  
  216. 52 |
  217. 53 | beforeAll(async () => {
  218. > 54 | await expect(linter.verifySetup(projectTmpDir)).resolves.toEqual(undefined);
  219. | ^
  220. 55 | });
  221. 56 |
  222. 57 | // Test lint and auto-fix modes
  223.  
  224. at expect (node_modules/expect/build/index.js:134:15)
  225. at Object.<anonymous> (test/linters/linters.test.js:54:10)
  226.  
  227. ● eslint › lint › ESLint returns expected lint output
  228.  
  229. expect(received).toEqual(expected) // deep equality
  230.  
  231. Expected: StringContaining "{\"filePath\":\"/Users/terencedignon/lint-action/test/tmp/eslint/file1.js\",\"messages\":[{\"ruleId\":\"prefer-const\",\"severity\":2,\"message\":\"'str' is never reassigned. Use 'const' instead.\",\"line\":1,\"column\":5,\"nodeType\":\"Identifier\",\"messageId\":\"useConst\",\"endLine\":1,\"endColumn\":8,\"fix\":{\"range\":[0,3],\"text\":\"const\"}},{\"ruleId\":\"no-warning-comments\",\"severity\":1,\"message\":\"Unexpected 'todo' comment.\",\"line\":5,\"column\":31,\"nodeType\":\"Line\",\"endLine\":5,\"endColumn\":56}],\"errorCount\":1,\"warningCount\":1,\"fixableErrorCount\":1,\"fixableWarningCount\":0,\"source\":\"let str = 'world'; // \\\"prefer-const\\\" warning\\n\\nfunction main() {\\n\\t// \\\"no-warning-comments\\\" error\\n\\tconsole.log('hello ' + str); // TODO: Change something\\n}\\n\\nmain();\\n\"}"
  232. Received: ""
  233.  
  234. 73 | if ("stdoutParts" in expected.cmdOutput) {
  235. 74 | expected.cmdOutput.stdoutParts.forEach((stdoutPart) =>
  236. > 75 | expect(stdout).toEqual(expect.stringContaining(stdoutPart)),
  237. | ^
  238. 76 | );
  239. 77 | } else if ("stdout" in expected.cmdOutput) {
  240. 78 | expect(stdout).toEqual(expected.cmdOutput.stdout);
  241.  
  242. at forEach (test/linters/linters.test.js:75:22)
  243. at Array.forEach (<anonymous>)
  244. at Object.<anonymous> (test/linters/linters.test.js:74:37)
  245.  
  246. ● eslint › lint › ESLint parses lint output correctly
  247.  
  248. expect(received).resolves.toEqual()
  249.  
  250. Received promise rejected instead of resolved
  251. Rejected to value: [Error: ESLint is not installed]
  252.  
  253. 52 |
  254. 53 | beforeAll(async () => {
  255. > 54 | await expect(linter.verifySetup(projectTmpDir)).resolves.toEqual(undefined);
  256. | ^
  257. 55 | });
  258. 56 |
  259. 57 | // Test lint and auto-fix modes
  260.  
  261. at expect (node_modules/expect/build/index.js:134:15)
  262. at Object.<anonymous> (test/linters/linters.test.js:54:10)
  263.  
  264. ● eslint › auto-fix › ESLint returns expected auto-fix output
  265.  
  266. expect(received).resolves.toEqual()
  267.  
  268. Received promise rejected instead of resolved
  269. Rejected to value: [Error: ESLint is not installed]
  270.  
  271. 52 |
  272. 53 | beforeAll(async () => {
  273. > 54 | await expect(linter.verifySetup(projectTmpDir)).resolves.toEqual(undefined);
  274. | ^
  275. 55 | });
  276. 56 |
  277. 57 | // Test lint and auto-fix modes
  278.  
  279. at expect (node_modules/expect/build/index.js:134:15)
  280. at Object.<anonymous> (test/linters/linters.test.js:54:10)
  281.  
  282. ● eslint › auto-fix › ESLint returns expected auto-fix output
  283.  
  284. expect(received).toEqual(expected) // deep equality
  285.  
  286. Expected: StringContaining "{\"filePath\":\"/Users/terencedignon/lint-action/test/tmp/eslint/file1.js\",\"messages\":[{\"ruleId\":\"no-warning-comments\",\"severity\":1,\"message\":\"Unexpected 'todo' comment.\",\"line\":5,\"column\":31,\"nodeType\":\"Line\",\"endLine\":5,\"endColumn\":56}],\"errorCount\":0,\"warningCount\":1,\"fixableErrorCount\":0,\"fixableWarningCount\":0,\"output\":\"const str = 'world'; // \\\"prefer-const\\\" warning\\n\\nfunction main() {\\n\\t// \\\"no-warning-comments\\\" error\\n\\tconsole.log('hello ' + str); // TODO: Change something\\n}\\n\\nmain();\\n\"}"
  287. Received: ""
  288.  
  289. 73 | if ("stdoutParts" in expected.cmdOutput) {
  290. 74 | expected.cmdOutput.stdoutParts.forEach((stdoutPart) =>
  291. > 75 | expect(stdout).toEqual(expect.stringContaining(stdoutPart)),
  292. | ^
  293. 76 | );
  294. 77 | } else if ("stdout" in expected.cmdOutput) {
  295. 78 | expect(stdout).toEqual(expected.cmdOutput.stdout);
  296.  
  297. at forEach (test/linters/linters.test.js:75:22)
  298. at Array.forEach (<anonymous>)
  299. at Object.<anonymous> (test/linters/linters.test.js:74:37)
  300.  
  301. ● eslint › auto-fix › ESLint parses auto-fix output correctly
  302.  
  303. expect(received).resolves.toEqual()
  304.  
  305. Received promise rejected instead of resolved
  306. Rejected to value: [Error: ESLint is not installed]
  307.  
  308. 52 |
  309. 53 | beforeAll(async () => {
  310. > 54 | await expect(linter.verifySetup(projectTmpDir)).resolves.toEqual(undefined);
  311. | ^
  312. 55 | });
  313. 56 |
  314. 57 | // Test lint and auto-fix modes
  315.  
  316. at expect (node_modules/expect/build/index.js:134:15)
  317. at Object.<anonymous> (test/linters/linters.test.js:54:10)
  318.  
  319. ● eslint-typescript › lint › ESLint returns expected lint output
  320.  
  321. expect(received).resolves.toEqual()
  322.  
  323. Received promise rejected instead of resolved
  324. Rejected to value: [Error: ESLint is not installed]
  325.  
  326. 52 |
  327. 53 | beforeAll(async () => {
  328. > 54 | await expect(linter.verifySetup(projectTmpDir)).resolves.toEqual(undefined);
  329. | ^
  330. 55 | });
  331. 56 |
  332. 57 | // Test lint and auto-fix modes
  333.  
  334. at expect (node_modules/expect/build/index.js:134:15)
  335. at Object.<anonymous> (test/linters/linters.test.js:54:10)
  336.  
  337. ● eslint-typescript › lint › ESLint returns expected lint output
  338.  
  339. expect(received).toEqual(expected) // deep equality
  340.  
  341. Expected: StringContaining "{\"filePath\":\"/Users/terencedignon/lint-action/test/tmp/eslint-typescript/file1.ts\",\"messages\":[{\"ruleId\":\"prefer-const\",\"severity\":2,\"message\":\"'str' is never reassigned. Use 'const' instead.\",\"line\":1,\"column\":5,\"nodeType\":\"Identifier\",\"messageId\":\"useConst\",\"endLine\":1,\"endColumn\":8,\"fix\":{\"range\":[0,3],\"text\":\"const\"}},{\"ruleId\":\"no-warning-comments\",\"severity\":1,\"message\":\"Unexpected 'todo' comment.\",\"line\":5,\"column\":31,\"nodeType\":\"Line\",\"endLine\":5,\"endColumn\":56}],\"errorCount\":1,\"warningCount\":1,\"fixableErrorCount\":1,\"fixableWarningCount\":0,\"source\":\"let str = 'world'; // \\\"prefer-const\\\" warning\\n\\nfunction main(): void {\\n\\t// \\\"no-warning-comments\\\" error\\n\\tconsole.log('hello ' + str); // TODO: Change something\\n}\\n\\nmain();\\n\"}"
  342. Received: ""
  343.  
  344. 73 | if ("stdoutParts" in expected.cmdOutput) {
  345. 74 | expected.cmdOutput.stdoutParts.forEach((stdoutPart) =>
  346. > 75 | expect(stdout).toEqual(expect.stringContaining(stdoutPart)),
  347. | ^
  348. 76 | );
  349. 77 | } else if ("stdout" in expected.cmdOutput) {
  350. 78 | expect(stdout).toEqual(expected.cmdOutput.stdout);
  351.  
  352. at forEach (test/linters/linters.test.js:75:22)
  353. at Array.forEach (<anonymous>)
  354. at Object.<anonymous> (test/linters/linters.test.js:74:37)
  355.  
  356. ● eslint-typescript › lint › ESLint parses lint output correctly
  357.  
  358. expect(received).resolves.toEqual()
  359.  
  360. Received promise rejected instead of resolved
  361. Rejected to value: [Error: ESLint is not installed]
  362.  
  363. 52 |
  364. 53 | beforeAll(async () => {
  365. > 54 | await expect(linter.verifySetup(projectTmpDir)).resolves.toEqual(undefined);
  366. | ^
  367. 55 | });
  368. 56 |
  369. 57 | // Test lint and auto-fix modes
  370.  
  371. at expect (node_modules/expect/build/index.js:134:15)
  372. at Object.<anonymous> (test/linters/linters.test.js:54:10)
  373.  
  374. ● eslint-typescript › auto-fix › ESLint returns expected auto-fix output
  375.  
  376. expect(received).resolves.toEqual()
  377.  
  378. Received promise rejected instead of resolved
  379. Rejected to value: [Error: ESLint is not installed]
  380.  
  381. 52 |
  382. 53 | beforeAll(async () => {
  383. > 54 | await expect(linter.verifySetup(projectTmpDir)).resolves.toEqual(undefined);
  384. | ^
  385. 55 | });
  386. 56 |
  387. 57 | // Test lint and auto-fix modes
  388.  
  389. at expect (node_modules/expect/build/index.js:134:15)
  390. at Object.<anonymous> (test/linters/linters.test.js:54:10)
  391.  
  392. ● eslint-typescript › auto-fix › ESLint returns expected auto-fix output
  393.  
  394. expect(received).toEqual(expected) // deep equality
  395.  
  396. Expected: StringContaining "{\"filePath\":\"/Users/terencedignon/lint-action/test/tmp/eslint-typescript/file1.ts\",\"messages\":[{\"ruleId\":\"no-warning-comments\",\"severity\":1,\"message\":\"Unexpected 'todo' comment.\",\"line\":5,\"column\":31,\"nodeType\":\"Line\",\"endLine\":5,\"endColumn\":56}],\"errorCount\":0,\"warningCount\":1,\"fixableErrorCount\":0,\"fixableWarningCount\":0,\"output\":\"const str = 'world'; // \\\"prefer-const\\\" warning\\n\\nfunction main(): void {\\n\\t// \\\"no-warning-comments\\\" error\\n\\tconsole.log('hello ' + str); // TODO: Change something\\n}\\n\\nmain();\\n\"}"
  397. Received: ""
  398.  
  399. 73 | if ("stdoutParts" in expected.cmdOutput) {
  400. 74 | expected.cmdOutput.stdoutParts.forEach((stdoutPart) =>
  401. > 75 | expect(stdout).toEqual(expect.stringContaining(stdoutPart)),
  402. | ^
  403. 76 | );
  404. 77 | } else if ("stdout" in expected.cmdOutput) {
  405. 78 | expect(stdout).toEqual(expected.cmdOutput.stdout);
  406.  
  407. at forEach (test/linters/linters.test.js:75:22)
  408. at Array.forEach (<anonymous>)
  409. at Object.<anonymous> (test/linters/linters.test.js:74:37)
  410.  
  411. ● eslint-typescript › auto-fix › ESLint parses auto-fix output correctly
  412.  
  413. expect(received).resolves.toEqual()
  414.  
  415. Received promise rejected instead of resolved
  416. Rejected to value: [Error: ESLint is not installed]
  417.  
  418. 52 |
  419. 53 | beforeAll(async () => {
  420. > 54 | await expect(linter.verifySetup(projectTmpDir)).resolves.toEqual(undefined);
  421. | ^
  422. 55 | });
  423. 56 |
  424. 57 | // Test lint and auto-fix modes
  425.  
  426. at expect (node_modules/expect/build/index.js:134:15)
  427. at Object.<anonymous> (test/linters/linters.test.js:54:10)
  428.  
  429. ● flake8 › lint › Flake8 returns expected lint output
  430.  
  431. expect(received).resolves.toEqual()
  432.  
  433. Received promise rejected instead of resolved
  434. Rejected to value: [Error: Flake8 is not installed]
  435.  
  436. 52 |
  437. 53 | beforeAll(async () => {
  438. > 54 | await expect(linter.verifySetup(projectTmpDir)).resolves.toEqual(undefined);
  439. | ^
  440. 55 | });
  441. 56 |
  442. 57 | // Test lint and auto-fix modes
  443.  
  444. at expect (node_modules/expect/build/index.js:134:15)
  445. at Object.<anonymous> (test/linters/linters.test.js:54:10)
  446.  
  447. ● flake8 › lint › Flake8 returns expected lint output
  448.  
  449. expect(received).toEqual(expected) // deep equality
  450.  
  451. Expected: 1
  452. Received: 127
  453.  
  454. 67 |
  455. 68 | // Exit code
  456. > 69 | expect(cmdOutput.status).toEqual(expected.cmdOutput.status);
  457. | ^
  458. 70 |
  459. 71 | // stdout
  460. 72 | const stdout = normalizeDates(cmdOutput.stdout);
  461.  
  462. at Object.<anonymous> (test/linters/linters.test.js:69:30)
  463.  
  464. ● flake8 › lint › Flake8 parses lint output correctly
  465.  
  466. expect(received).resolves.toEqual()
  467.  
  468. Received promise rejected instead of resolved
  469. Rejected to value: [Error: Flake8 is not installed]
  470.  
  471. 52 |
  472. 53 | beforeAll(async () => {
  473. > 54 | await expect(linter.verifySetup(projectTmpDir)).resolves.toEqual(undefined);
  474. | ^
  475. 55 | });
  476. 56 |
  477. 57 | // Test lint and auto-fix modes
  478.  
  479. at expect (node_modules/expect/build/index.js:134:15)
  480. at Object.<anonymous> (test/linters/linters.test.js:54:10)
  481.  
  482. ● flake8 › auto-fix › Flake8 returns expected auto-fix output
  483.  
  484. expect(received).resolves.toEqual()
  485.  
  486. Received promise rejected instead of resolved
  487. Rejected to value: [Error: Flake8 is not installed]
  488.  
  489. 52 |
  490. 53 | beforeAll(async () => {
  491. > 54 | await expect(linter.verifySetup(projectTmpDir)).resolves.toEqual(undefined);
  492. | ^
  493. 55 | });
  494. 56 |
  495. 57 | // Test lint and auto-fix modes
  496.  
  497. at expect (node_modules/expect/build/index.js:134:15)
  498. at Object.<anonymous> (test/linters/linters.test.js:54:10)
  499.  
  500. ● flake8 › auto-fix › Flake8 returns expected auto-fix output
  501.  
  502. expect(received).toEqual(expected) // deep equality
  503.  
  504. Expected: 1
  505. Received: 127
  506.  
  507. 67 |
  508. 68 | // Exit code
  509. > 69 | expect(cmdOutput.status).toEqual(expected.cmdOutput.status);
  510. | ^
  511. 70 |
  512. 71 | // stdout
  513. 72 | const stdout = normalizeDates(cmdOutput.stdout);
  514.  
  515. at Object.<anonymous> (test/linters/linters.test.js:69:30)
  516.  
  517. ● flake8 › auto-fix › Flake8 parses auto-fix output correctly
  518.  
  519. expect(received).resolves.toEqual()
  520.  
  521. Received promise rejected instead of resolved
  522. Rejected to value: [Error: Flake8 is not installed]
  523.  
  524. 52 |
  525. 53 | beforeAll(async () => {
  526. > 54 | await expect(linter.verifySetup(projectTmpDir)).resolves.toEqual(undefined);
  527. | ^
  528. 55 | });
  529. 56 |
  530. 57 | // Test lint and auto-fix modes
  531.  
  532. at expect (node_modules/expect/build/index.js:134:15)
  533. at Object.<anonymous> (test/linters/linters.test.js:54:10)
  534.  
  535. ● gofmt › lint › gofmt returns expected lint output
  536.  
  537. expect(received).resolves.toEqual()
  538.  
  539. Received promise rejected instead of resolved
  540. Rejected to value: [Error: gofmt is not installed]
  541.  
  542. 52 |
  543. 53 | beforeAll(async () => {
  544. > 54 | await expect(linter.verifySetup(projectTmpDir)).resolves.toEqual(undefined);
  545. | ^
  546. 55 | });
  547. 56 |
  548. 57 | // Test lint and auto-fix modes
  549.  
  550. at expect (node_modules/expect/build/index.js:134:15)
  551. at Object.<anonymous> (test/linters/linters.test.js:54:10)
  552.  
  553. ● gofmt › lint › gofmt returns expected lint output
  554.  
  555. expect(received).toEqual(expected) // deep equality
  556.  
  557. Expected: 0
  558. Received: 127
  559.  
  560. 67 |
  561. 68 | // Exit code
  562. > 69 | expect(cmdOutput.status).toEqual(expected.cmdOutput.status);
  563. | ^
  564. 70 |
  565. 71 | // stdout
  566. 72 | const stdout = normalizeDates(cmdOutput.stdout);
  567.  
  568. at Object.<anonymous> (test/linters/linters.test.js:69:30)
  569.  
  570. ● gofmt › lint › gofmt parses lint output correctly
  571.  
  572. expect(received).resolves.toEqual()
  573.  
  574. Received promise rejected instead of resolved
  575. Rejected to value: [Error: gofmt is not installed]
  576.  
  577. 52 |
  578. 53 | beforeAll(async () => {
  579. > 54 | await expect(linter.verifySetup(projectTmpDir)).resolves.toEqual(undefined);
  580. | ^
  581. 55 | });
  582. 56 |
  583. 57 | // Test lint and auto-fix modes
  584.  
  585. at expect (node_modules/expect/build/index.js:134:15)
  586. at Object.<anonymous> (test/linters/linters.test.js:54:10)
  587.  
  588. ● gofmt › auto-fix › gofmt returns expected auto-fix output
  589.  
  590. expect(received).resolves.toEqual()
  591.  
  592. Received promise rejected instead of resolved
  593. Rejected to value: [Error: gofmt is not installed]
  594.  
  595. 52 |
  596. 53 | beforeAll(async () => {
  597. > 54 | await expect(linter.verifySetup(projectTmpDir)).resolves.toEqual(undefined);
  598. | ^
  599. 55 | });
  600. 56 |
  601. 57 | // Test lint and auto-fix modes
  602.  
  603. at expect (node_modules/expect/build/index.js:134:15)
  604. at Object.<anonymous> (test/linters/linters.test.js:54:10)
  605.  
  606. ● gofmt › auto-fix › gofmt returns expected auto-fix output
  607.  
  608. expect(received).toEqual(expected) // deep equality
  609.  
  610. Expected: 0
  611. Received: 127
  612.  
  613. 67 |
  614. 68 | // Exit code
  615. > 69 | expect(cmdOutput.status).toEqual(expected.cmdOutput.status);
  616. | ^
  617. 70 |
  618. 71 | // stdout
  619. 72 | const stdout = normalizeDates(cmdOutput.stdout);
  620.  
  621. at Object.<anonymous> (test/linters/linters.test.js:69:30)
  622.  
  623. ● gofmt › auto-fix › gofmt parses auto-fix output correctly
  624.  
  625. expect(received).resolves.toEqual()
  626.  
  627. Received promise rejected instead of resolved
  628. Rejected to value: [Error: gofmt is not installed]
  629.  
  630. 52 |
  631. 53 | beforeAll(async () => {
  632. > 54 | await expect(linter.verifySetup(projectTmpDir)).resolves.toEqual(undefined);
  633. | ^
  634. 55 | });
  635. 56 |
  636. 57 | // Test lint and auto-fix modes
  637.  
  638. at expect (node_modules/expect/build/index.js:134:15)
  639. at Object.<anonymous> (test/linters/linters.test.js:54:10)
  640.  
  641. ● golint › lint › golint returns expected lint output
  642.  
  643. expect(received).resolves.toEqual()
  644.  
  645. Received promise rejected instead of resolved
  646. Rejected to value: [Error: golint is not installed]
  647.  
  648. 52 |
  649. 53 | beforeAll(async () => {
  650. > 54 | await expect(linter.verifySetup(projectTmpDir)).resolves.toEqual(undefined);
  651. | ^
  652. 55 | });
  653. 56 |
  654. 57 | // Test lint and auto-fix modes
  655.  
  656. at expect (node_modules/expect/build/index.js:134:15)
  657. at Object.<anonymous> (test/linters/linters.test.js:54:10)
  658.  
  659. ● golint › lint › golint returns expected lint output
  660.  
  661. expect(received).toEqual(expected) // deep equality
  662.  
  663. Expected: 1
  664. Received: 127
  665.  
  666. 67 |
  667. 68 | // Exit code
  668. > 69 | expect(cmdOutput.status).toEqual(expected.cmdOutput.status);
  669. | ^
  670. 70 |
  671. 71 | // stdout
  672. 72 | const stdout = normalizeDates(cmdOutput.stdout);
  673.  
  674. at Object.<anonymous> (test/linters/linters.test.js:69:30)
  675.  
  676. ● golint › lint › golint parses lint output correctly
  677.  
  678. expect(received).resolves.toEqual()
  679.  
  680. Received promise rejected instead of resolved
  681. Rejected to value: [Error: golint is not installed]
  682.  
  683. 52 |
  684. 53 | beforeAll(async () => {
  685. > 54 | await expect(linter.verifySetup(projectTmpDir)).resolves.toEqual(undefined);
  686. | ^
  687. 55 | });
  688. 56 |
  689. 57 | // Test lint and auto-fix modes
  690.  
  691. at expect (node_modules/expect/build/index.js:134:15)
  692. at Object.<anonymous> (test/linters/linters.test.js:54:10)
  693.  
  694. ● golint › auto-fix › golint returns expected auto-fix output
  695.  
  696. expect(received).resolves.toEqual()
  697.  
  698. Received promise rejected instead of resolved
  699. Rejected to value: [Error: golint is not installed]
  700.  
  701. 52 |
  702. 53 | beforeAll(async () => {
  703. > 54 | await expect(linter.verifySetup(projectTmpDir)).resolves.toEqual(undefined);
  704. | ^
  705. 55 | });
  706. 56 |
  707. 57 | // Test lint and auto-fix modes
  708.  
  709. at expect (node_modules/expect/build/index.js:134:15)
  710. at Object.<anonymous> (test/linters/linters.test.js:54:10)
  711.  
  712. ● golint › auto-fix › golint returns expected auto-fix output
  713.  
  714. expect(received).toEqual(expected) // deep equality
  715.  
  716. Expected: 1
  717. Received: 127
  718.  
  719. 67 |
  720. 68 | // Exit code
  721. > 69 | expect(cmdOutput.status).toEqual(expected.cmdOutput.status);
  722. | ^
  723. 70 |
  724. 71 | // stdout
  725. 72 | const stdout = normalizeDates(cmdOutput.stdout);
  726.  
  727. at Object.<anonymous> (test/linters/linters.test.js:69:30)
  728.  
  729. ● golint › auto-fix › golint parses auto-fix output correctly
  730.  
  731. expect(received).resolves.toEqual()
  732.  
  733. Received promise rejected instead of resolved
  734. Rejected to value: [Error: golint is not installed]
  735.  
  736. 52 |
  737. 53 | beforeAll(async () => {
  738. > 54 | await expect(linter.verifySetup(projectTmpDir)).resolves.toEqual(undefined);
  739. | ^
  740. 55 | });
  741. 56 |
  742. 57 | // Test lint and auto-fix modes
  743.  
  744. at expect (node_modules/expect/build/index.js:134:15)
  745. at Object.<anonymous> (test/linters/linters.test.js:54:10)
  746.  
  747. ● mypy › lint › Mypy returns expected lint output
  748.  
  749. expect(received).resolves.toEqual()
  750.  
  751. Received promise rejected instead of resolved
  752. Rejected to value: [Error: Mypy is not installed]
  753.  
  754. 52 |
  755. 53 | beforeAll(async () => {
  756. > 54 | await expect(linter.verifySetup(projectTmpDir)).resolves.toEqual(undefined);
  757. | ^
  758. 55 | });
  759. 56 |
  760. 57 | // Test lint and auto-fix modes
  761.  
  762. at expect (node_modules/expect/build/index.js:134:15)
  763. at Object.<anonymous> (test/linters/linters.test.js:54:10)
  764.  
  765. ● mypy › lint › Mypy returns expected lint output
  766.  
  767. expect(received).toEqual(expected) // deep equality
  768.  
  769. Expected: 1
  770. Received: 127
  771.  
  772. 67 |
  773. 68 | // Exit code
  774. > 69 | expect(cmdOutput.status).toEqual(expected.cmdOutput.status);
  775. | ^
  776. 70 |
  777. 71 | // stdout
  778. 72 | const stdout = normalizeDates(cmdOutput.stdout);
  779.  
  780. at Object.<anonymous> (test/linters/linters.test.js:69:30)
  781.  
  782. ● mypy › lint › Mypy parses lint output correctly
  783.  
  784. expect(received).resolves.toEqual()
  785.  
  786. Received promise rejected instead of resolved
  787. Rejected to value: [Error: Mypy is not installed]
  788.  
  789. 52 |
  790. 53 | beforeAll(async () => {
  791. > 54 | await expect(linter.verifySetup(projectTmpDir)).resolves.toEqual(undefined);
  792. | ^
  793. 55 | });
  794. 56 |
  795. 57 | // Test lint and auto-fix modes
  796.  
  797. at expect (node_modules/expect/build/index.js:134:15)
  798. at Object.<anonymous> (test/linters/linters.test.js:54:10)
  799.  
  800. ● mypy › auto-fix › Mypy returns expected auto-fix output
  801.  
  802. expect(received).resolves.toEqual()
  803.  
  804. Received promise rejected instead of resolved
  805. Rejected to value: [Error: Mypy is not installed]
  806.  
  807. 52 |
  808. 53 | beforeAll(async () => {
  809. > 54 | await expect(linter.verifySetup(projectTmpDir)).resolves.toEqual(undefined);
  810. | ^
  811. 55 | });
  812. 56 |
  813. 57 | // Test lint and auto-fix modes
  814.  
  815. at expect (node_modules/expect/build/index.js:134:15)
  816. at Object.<anonymous> (test/linters/linters.test.js:54:10)
  817.  
  818. ● mypy › auto-fix › Mypy returns expected auto-fix output
  819.  
  820. expect(received).toEqual(expected) // deep equality
  821.  
  822. Expected: 1
  823. Received: 127
  824.  
  825. 67 |
  826. 68 | // Exit code
  827. > 69 | expect(cmdOutput.status).toEqual(expected.cmdOutput.status);
  828. | ^
  829. 70 |
  830. 71 | // stdout
  831. 72 | const stdout = normalizeDates(cmdOutput.stdout);
  832.  
  833. at Object.<anonymous> (test/linters/linters.test.js:69:30)
  834.  
  835. ● mypy › auto-fix › Mypy parses auto-fix output correctly
  836.  
  837. expect(received).resolves.toEqual()
  838.  
  839. Received promise rejected instead of resolved
  840. Rejected to value: [Error: Mypy is not installed]
  841.  
  842. 52 |
  843. 53 | beforeAll(async () => {
  844. > 54 | await expect(linter.verifySetup(projectTmpDir)).resolves.toEqual(undefined);
  845. | ^
  846. 55 | });
  847. 56 |
  848. 57 | // Test lint and auto-fix modes
  849.  
  850. at expect (node_modules/expect/build/index.js:134:15)
  851. at Object.<anonymous> (test/linters/linters.test.js:54:10)
  852.  
  853. ● prettier › lint › Prettier returns expected lint output
  854.  
  855. expect(received).resolves.toEqual()
  856.  
  857. Received promise rejected instead of resolved
  858. Rejected to value: [Error: Prettier is not installed]
  859.  
  860. 52 |
  861. 53 | beforeAll(async () => {
  862. > 54 | await expect(linter.verifySetup(projectTmpDir)).resolves.toEqual(undefined);
  863. | ^
  864. 55 | });
  865. 56 |
  866. 57 | // Test lint and auto-fix modes
  867.  
  868. at expect (node_modules/expect/build/index.js:134:15)
  869. at Object.<anonymous> (test/linters/linters.test.js:54:10)
  870.  
  871. ● prettier › lint › Prettier returns expected lint output
  872.  
  873. expect(received).toEqual(expected) // deep equality
  874.  
  875. Expected: StringContaining "file1.js"
  876. Received: ""
  877.  
  878. 73 | if ("stdoutParts" in expected.cmdOutput) {
  879. 74 | expected.cmdOutput.stdoutParts.forEach((stdoutPart) =>
  880. > 75 | expect(stdout).toEqual(expect.stringContaining(stdoutPart)),
  881. | ^
  882. 76 | );
  883. 77 | } else if ("stdout" in expected.cmdOutput) {
  884. 78 | expect(stdout).toEqual(expected.cmdOutput.stdout);
  885.  
  886. at forEach (test/linters/linters.test.js:75:22)
  887. at Array.forEach (<anonymous>)
  888. at Object.<anonymous> (test/linters/linters.test.js:74:37)
  889.  
  890. ● prettier › lint › Prettier parses lint output correctly
  891.  
  892. expect(received).resolves.toEqual()
  893.  
  894. Received promise rejected instead of resolved
  895. Rejected to value: [Error: Prettier is not installed]
  896.  
  897. 52 |
  898. 53 | beforeAll(async () => {
  899. > 54 | await expect(linter.verifySetup(projectTmpDir)).resolves.toEqual(undefined);
  900. | ^
  901. 55 | });
  902. 56 |
  903. 57 | // Test lint and auto-fix modes
  904.  
  905. at expect (node_modules/expect/build/index.js:134:15)
  906. at Object.<anonymous> (test/linters/linters.test.js:54:10)
  907.  
  908. ● prettier › auto-fix › Prettier returns expected auto-fix output
  909.  
  910. expect(received).resolves.toEqual()
  911.  
  912. Received promise rejected instead of resolved
  913. Rejected to value: [Error: Prettier is not installed]
  914.  
  915. 52 |
  916. 53 | beforeAll(async () => {
  917. > 54 | await expect(linter.verifySetup(projectTmpDir)).resolves.toEqual(undefined);
  918. | ^
  919. 55 | });
  920. 56 |
  921. 57 | // Test lint and auto-fix modes
  922.  
  923. at expect (node_modules/expect/build/index.js:134:15)
  924. at Object.<anonymous> (test/linters/linters.test.js:54:10)
  925.  
  926. ● prettier › auto-fix › Prettier returns expected auto-fix output
  927.  
  928. expect(received).toEqual(expected) // deep equality
  929.  
  930. Expected: 0
  931. Received: 1
  932.  
  933. 67 |
  934. 68 | // Exit code
  935. > 69 | expect(cmdOutput.status).toEqual(expected.cmdOutput.status);
  936. | ^
  937. 70 |
  938. 71 | // stdout
  939. 72 | const stdout = normalizeDates(cmdOutput.stdout);
  940.  
  941. at Object.<anonymous> (test/linters/linters.test.js:69:30)
  942.  
  943. ● prettier › auto-fix › Prettier parses auto-fix output correctly
  944.  
  945. expect(received).resolves.toEqual()
  946.  
  947. Received promise rejected instead of resolved
  948. Rejected to value: [Error: Prettier is not installed]
  949.  
  950. 52 |
  951. 53 | beforeAll(async () => {
  952. > 54 | await expect(linter.verifySetup(projectTmpDir)).resolves.toEqual(undefined);
  953. | ^
  954. 55 | });
  955. 56 |
  956. 57 | // Test lint and auto-fix modes
  957.  
  958. at expect (node_modules/expect/build/index.js:134:15)
  959. at Object.<anonymous> (test/linters/linters.test.js:54:10)
  960.  
  961. ● rubocop › lint › RuboCop returns expected lint output
  962.  
  963. expect(received).resolves.toEqual()
  964.  
  965. Received promise rejected instead of resolved
  966. Rejected to value: [Error: RuboCop is not installed]
  967.  
  968. 52 |
  969. 53 | beforeAll(async () => {
  970. > 54 | await expect(linter.verifySetup(projectTmpDir)).resolves.toEqual(undefined);
  971. | ^
  972. 55 | });
  973. 56 |
  974. 57 | // Test lint and auto-fix modes
  975.  
  976. at expect (node_modules/expect/build/index.js:134:15)
  977. at Object.<anonymous> (test/linters/linters.test.js:54:10)
  978.  
  979. ● rubocop › lint › RuboCop returns expected lint output
  980.  
  981. expect(received).toEqual(expected) // deep equality
  982.  
  983. Expected: 1
  984. Received: 127
  985.  
  986. 67 |
  987. 68 | // Exit code
  988. > 69 | expect(cmdOutput.status).toEqual(expected.cmdOutput.status);
  989. | ^
  990. 70 |
  991. 71 | // stdout
  992. 72 | const stdout = normalizeDates(cmdOutput.stdout);
  993.  
  994. at Object.<anonymous> (test/linters/linters.test.js:69:30)
  995.  
  996. ● rubocop › lint › RuboCop parses lint output correctly
  997.  
  998. expect(received).resolves.toEqual()
  999.  
  1000. Received promise rejected instead of resolved
  1001. Rejected to value: [Error: RuboCop is not installed]
  1002.  
  1003. 52 |
  1004. 53 | beforeAll(async () => {
  1005. > 54 | await expect(linter.verifySetup(projectTmpDir)).resolves.toEqual(undefined);
  1006. | ^
  1007. 55 | });
  1008. 56 |
  1009. 57 | // Test lint and auto-fix modes
  1010.  
  1011. at expect (node_modules/expect/build/index.js:134:15)
  1012. at Object.<anonymous> (test/linters/linters.test.js:54:10)
  1013.  
  1014. ● rubocop › auto-fix › RuboCop returns expected auto-fix output
  1015.  
  1016. expect(received).resolves.toEqual()
  1017.  
  1018. Received promise rejected instead of resolved
  1019. Rejected to value: [Error: RuboCop is not installed]
  1020.  
  1021. 52 |
  1022. 53 | beforeAll(async () => {
  1023. > 54 | await expect(linter.verifySetup(projectTmpDir)).resolves.toEqual(undefined);
  1024. | ^
  1025. 55 | });
  1026. 56 |
  1027. 57 | // Test lint and auto-fix modes
  1028.  
  1029. at expect (node_modules/expect/build/index.js:134:15)
  1030. at Object.<anonymous> (test/linters/linters.test.js:54:10)
  1031.  
  1032. ● rubocop › auto-fix › RuboCop returns expected auto-fix output
  1033.  
  1034. expect(received).toEqual(expected) // deep equality
  1035.  
  1036. Expected: 1
  1037. Received: 127
  1038.  
  1039. 67 |
  1040. 68 | // Exit code
  1041. > 69 | expect(cmdOutput.status).toEqual(expected.cmdOutput.status);
  1042. | ^
  1043. 70 |
  1044. 71 | // stdout
  1045. 72 | const stdout = normalizeDates(cmdOutput.stdout);
  1046.  
  1047. at Object.<anonymous> (test/linters/linters.test.js:69:30)
  1048.  
  1049. ● rubocop › auto-fix › RuboCop parses auto-fix output correctly
  1050.  
  1051. expect(received).resolves.toEqual()
  1052.  
  1053. Received promise rejected instead of resolved
  1054. Rejected to value: [Error: RuboCop is not installed]
  1055.  
  1056. 52 |
  1057. 53 | beforeAll(async () => {
  1058. > 54 | await expect(linter.verifySetup(projectTmpDir)).resolves.toEqual(undefined);
  1059. | ^
  1060. 55 | });
  1061. 56 |
  1062. 57 | // Test lint and auto-fix modes
  1063.  
  1064. at expect (node_modules/expect/build/index.js:134:15)
  1065. at Object.<anonymous> (test/linters/linters.test.js:54:10)
  1066.  
  1067. ● stylelint › lint › stylelint returns expected lint output
  1068.  
  1069. expect(received).resolves.toEqual()
  1070.  
  1071. Received promise rejected instead of resolved
  1072. Rejected to value: [Error: stylelint is not installed]
  1073.  
  1074. 52 |
  1075. 53 | beforeAll(async () => {
  1076. > 54 | await expect(linter.verifySetup(projectTmpDir)).resolves.toEqual(undefined);
  1077. | ^
  1078. 55 | });
  1079. 56 |
  1080. 57 | // Test lint and auto-fix modes
  1081.  
  1082. at expect (node_modules/expect/build/index.js:134:15)
  1083. at Object.<anonymous> (test/linters/linters.test.js:54:10)
  1084.  
  1085. ● stylelint › lint › stylelint returns expected lint output
  1086.  
  1087. expect(received).toEqual(expected) // deep equality
  1088.  
  1089. Expected: 2
  1090. Received: 1
  1091.  
  1092. 67 |
  1093. 68 | // Exit code
  1094. > 69 | expect(cmdOutput.status).toEqual(expected.cmdOutput.status);
  1095. | ^
  1096. 70 |
  1097. 71 | // stdout
  1098. 72 | const stdout = normalizeDates(cmdOutput.stdout);
  1099.  
  1100. at Object.<anonymous> (test/linters/linters.test.js:69:30)
  1101.  
  1102. ● stylelint › lint › stylelint parses lint output correctly
  1103.  
  1104. expect(received).resolves.toEqual()
  1105.  
  1106. Received promise rejected instead of resolved
  1107. Rejected to value: [Error: stylelint is not installed]
  1108.  
  1109. 52 |
  1110. 53 | beforeAll(async () => {
  1111. > 54 | await expect(linter.verifySetup(projectTmpDir)).resolves.toEqual(undefined);
  1112. | ^
  1113. 55 | });
  1114. 56 |
  1115. 57 | // Test lint and auto-fix modes
  1116.  
  1117. at expect (node_modules/expect/build/index.js:134:15)
  1118. at Object.<anonymous> (test/linters/linters.test.js:54:10)
  1119.  
  1120. ● stylelint › auto-fix › stylelint returns expected auto-fix output
  1121.  
  1122. expect(received).resolves.toEqual()
  1123.  
  1124. Received promise rejected instead of resolved
  1125. Rejected to value: [Error: stylelint is not installed]
  1126.  
  1127. 52 |
  1128. 53 | beforeAll(async () => {
  1129. > 54 | await expect(linter.verifySetup(projectTmpDir)).resolves.toEqual(undefined);
  1130. | ^
  1131. 55 | });
  1132. 56 |
  1133. 57 | // Test lint and auto-fix modes
  1134.  
  1135. at expect (node_modules/expect/build/index.js:134:15)
  1136. at Object.<anonymous> (test/linters/linters.test.js:54:10)
  1137.  
  1138. ● stylelint › auto-fix › stylelint returns expected auto-fix output
  1139.  
  1140. expect(received).toEqual(expected) // deep equality
  1141.  
  1142. Expected: 2
  1143. Received: 1
  1144.  
  1145. 67 |
  1146. 68 | // Exit code
  1147. > 69 | expect(cmdOutput.status).toEqual(expected.cmdOutput.status);
  1148. | ^
  1149. 70 |
  1150. 71 | // stdout
  1151. 72 | const stdout = normalizeDates(cmdOutput.stdout);
  1152.  
  1153. at Object.<anonymous> (test/linters/linters.test.js:69:30)
  1154.  
  1155. ● stylelint › auto-fix › stylelint parses auto-fix output correctly
  1156.  
  1157. expect(received).resolves.toEqual()
  1158.  
  1159. Received promise rejected instead of resolved
  1160. Rejected to value: [Error: stylelint is not installed]
  1161.  
  1162. 52 |
  1163. 53 | beforeAll(async () => {
  1164. > 54 | await expect(linter.verifySetup(projectTmpDir)).resolves.toEqual(undefined);
  1165. | ^
  1166. 55 | });
  1167. 56 |
  1168. 57 | // Test lint and auto-fix modes
  1169.  
  1170. at expect (node_modules/expect/build/index.js:134:15)
  1171. at Object.<anonymous> (test/linters/linters.test.js:54:10)
  1172.  
  1173. ● xo › lint › XO returns expected lint output
  1174.  
  1175. expect(received).resolves.toEqual()
  1176.  
  1177. Received promise rejected instead of resolved
  1178. Rejected to value: [Error: XO is not installed]
  1179.  
  1180. 52 |
  1181. 53 | beforeAll(async () => {
  1182. > 54 | await expect(linter.verifySetup(projectTmpDir)).resolves.toEqual(undefined);
  1183. | ^
  1184. 55 | });
  1185. 56 |
  1186. 57 | // Test lint and auto-fix modes
  1187.  
  1188. at expect (node_modules/expect/build/index.js:134:15)
  1189. at Object.<anonymous> (test/linters/linters.test.js:54:10)
  1190.  
  1191. ● xo › lint › XO returns expected lint output
  1192.  
  1193. expect(received).toEqual(expected) // deep equality
  1194.  
  1195. Expected: StringContaining "{\"filePath\":\"/Users/terencedignon/lint-action/test/tmp/xo/file1.js\",\"messages\":[{\"ruleId\":\"prefer-const\",\"severity\":2,\"message\":\"'str' is never reassigned. Use 'const' instead.\",\"line\":1,\"column\":5,\"nodeType\":\"Identifier\",\"messageId\":\"useConst\",\"endLine\":1,\"endColumn\":8,\"fix\":{\"range\":[0,3],\"text\":\"const\"}},{\"ruleId\":\"no-warning-comments\",\"severity\":1,\"message\":\"Unexpected 'todo' comment.\",\"line\":5,\"column\":31,\"nodeType\":\"Line\",\"endLine\":5,\"endColumn\":56}],\"errorCount\":1,\"warningCount\":1,\"fixableErrorCount\":1,\"fixableWarningCount\":0,\"source\":\"let str = 'world'; // \\\"prefer-const\\\" warning\\n\\nfunction main() {\\n\\t// \\\"no-warning-comments\\\" error\\n\\tconsole.log('hello ' + str); // TODO: Change something\\n}\\n\\nmain();\\n\"}"
  1196. Received: ""
  1197.  
  1198. 73 | if ("stdoutParts" in expected.cmdOutput) {
  1199. 74 | expected.cmdOutput.stdoutParts.forEach((stdoutPart) =>
  1200. > 75 | expect(stdout).toEqual(expect.stringContaining(stdoutPart)),
  1201. | ^
  1202. 76 | );
  1203. 77 | } else if ("stdout" in expected.cmdOutput) {
  1204. 78 | expect(stdout).toEqual(expected.cmdOutput.stdout);
  1205.  
  1206. at forEach (test/linters/linters.test.js:75:22)
  1207. at Array.forEach (<anonymous>)
  1208. at Object.<anonymous> (test/linters/linters.test.js:74:37)
  1209.  
  1210. ● xo › lint › XO parses lint output correctly
  1211.  
  1212. expect(received).resolves.toEqual()
  1213.  
  1214. Received promise rejected instead of resolved
  1215. Rejected to value: [Error: XO is not installed]
  1216.  
  1217. 52 |
  1218. 53 | beforeAll(async () => {
  1219. > 54 | await expect(linter.verifySetup(projectTmpDir)).resolves.toEqual(undefined);
  1220. | ^
  1221. 55 | });
  1222. 56 |
  1223. 57 | // Test lint and auto-fix modes
  1224.  
  1225. at expect (node_modules/expect/build/index.js:134:15)
  1226. at Object.<anonymous> (test/linters/linters.test.js:54:10)
  1227.  
  1228. ● xo › auto-fix › XO returns expected auto-fix output
  1229.  
  1230. expect(received).resolves.toEqual()
  1231.  
  1232. Received promise rejected instead of resolved
  1233. Rejected to value: [Error: XO is not installed]
  1234.  
  1235. 52 |
  1236. 53 | beforeAll(async () => {
  1237. > 54 | await expect(linter.verifySetup(projectTmpDir)).resolves.toEqual(undefined);
  1238. | ^
  1239. 55 | });
  1240. 56 |
  1241. 57 | // Test lint and auto-fix modes
  1242.  
  1243. at expect (node_modules/expect/build/index.js:134:15)
  1244. at Object.<anonymous> (test/linters/linters.test.js:54:10)
  1245.  
  1246. ● xo › auto-fix › XO returns expected auto-fix output
  1247.  
  1248. expect(received).toEqual(expected) // deep equality
  1249.  
  1250. Expected: StringContaining "{\"filePath\":\"/Users/terencedignon/lint-action/test/tmp/xo/file1.js\",\"messages\":[{\"ruleId\":\"no-warning-comments\",\"severity\":1,\"message\":\"Unexpected 'todo' comment.\",\"line\":5,\"column\":31,\"nodeType\":\"Line\",\"endLine\":5,\"endColumn\":56}],\"errorCount\":0,\"warningCount\":1,\"fixableErrorCount\":0,\"fixableWarningCount\":0,\"output\":\"const str = 'world'; // \\\"prefer-const\\\" warning\\n\\nfunction main() {\\n\\t// \\\"no-warning-comments\\\" error\\n\\tconsole.log('hello ' + str); // TODO: Change something\\n}\\n\\nmain();\\n\"}"
  1251. Received: ""
  1252.  
  1253. 73 | if ("stdoutParts" in expected.cmdOutput) {
  1254. 74 | expected.cmdOutput.stdoutParts.forEach((stdoutPart) =>
  1255. > 75 | expect(stdout).toEqual(expect.stringContaining(stdoutPart)),
  1256. | ^
  1257. 76 | );
  1258. 77 | } else if ("stdout" in expected.cmdOutput) {
  1259. 78 | expect(stdout).toEqual(expected.cmdOutput.stdout);
  1260.  
  1261. at forEach (test/linters/linters.test.js:75:22)
  1262. at Array.forEach (<anonymous>)
  1263. at Object.<anonymous> (test/linters/linters.test.js:74:37)
  1264.  
  1265. ● xo › auto-fix › XO parses auto-fix output correctly
  1266.  
  1267. expect(received).resolves.toEqual()
  1268.  
  1269. Received promise rejected instead of resolved
  1270. Rejected to value: [Error: XO is not installed]
  1271.  
  1272. 52 |
  1273. 53 | beforeAll(async () => {
  1274. > 54 | await expect(linter.verifySetup(projectTmpDir)).resolves.toEqual(undefined);
  1275. | ^
  1276. 55 | });
  1277. 56 |
  1278. 57 | // Test lint and auto-fix modes
  1279.  
  1280. at expect (node_modules/expect/build/index.js:134:15)
  1281. at Object.<anonymous> (test/linters/linters.test.js:54:10)
  1282.  
  1283. ● swift-format-lockwood › lint › SwiftFormat returns expected lint output
  1284.  
  1285. expect(received).resolves.toEqual()
  1286.  
  1287. Received promise rejected instead of resolved
  1288. Rejected to value: [Error: SwiftFormat is not installed]
  1289.  
  1290. 52 |
  1291. 53 | beforeAll(async () => {
  1292. > 54 | await expect(linter.verifySetup(projectTmpDir)).resolves.toEqual(undefined);
  1293. | ^
  1294. 55 | });
  1295. 56 |
  1296. 57 | // Test lint and auto-fix modes
  1297.  
  1298. at expect (node_modules/expect/build/index.js:134:15)
  1299. at Object.<anonymous> (test/linters/linters.test.js:54:10)
  1300.  
  1301. ● swift-format-lockwood › lint › SwiftFormat returns expected lint output
  1302.  
  1303. expect(received).toEqual(expected) // deep equality
  1304.  
  1305. Expected: 1
  1306. Received: 127
  1307.  
  1308. 67 |
  1309. 68 | // Exit code
  1310. > 69 | expect(cmdOutput.status).toEqual(expected.cmdOutput.status);
  1311. | ^
  1312. 70 |
  1313. 71 | // stdout
  1314. 72 | const stdout = normalizeDates(cmdOutput.stdout);
  1315.  
  1316. at Object.<anonymous> (test/linters/linters.test.js:69:30)
  1317.  
  1318. ● swift-format-lockwood › lint › SwiftFormat parses lint output correctly
  1319.  
  1320. expect(received).resolves.toEqual()
  1321.  
  1322. Received promise rejected instead of resolved
  1323. Rejected to value: [Error: SwiftFormat is not installed]
  1324.  
  1325. 52 |
  1326. 53 | beforeAll(async () => {
  1327. > 54 | await expect(linter.verifySetup(projectTmpDir)).resolves.toEqual(undefined);
  1328. | ^
  1329. 55 | });
  1330. 56 |
  1331. 57 | // Test lint and auto-fix modes
  1332.  
  1333. at expect (node_modules/expect/build/index.js:134:15)
  1334. at Object.<anonymous> (test/linters/linters.test.js:54:10)
  1335.  
  1336. ● swift-format-lockwood › auto-fix › SwiftFormat returns expected auto-fix output
  1337.  
  1338. expect(received).resolves.toEqual()
  1339.  
  1340. Received promise rejected instead of resolved
  1341. Rejected to value: [Error: SwiftFormat is not installed]
  1342.  
  1343. 52 |
  1344. 53 | beforeAll(async () => {
  1345. > 54 | await expect(linter.verifySetup(projectTmpDir)).resolves.toEqual(undefined);
  1346. | ^
  1347. 55 | });
  1348. 56 |
  1349. 57 | // Test lint and auto-fix modes
  1350.  
  1351. at expect (node_modules/expect/build/index.js:134:15)
  1352. at Object.<anonymous> (test/linters/linters.test.js:54:10)
  1353.  
  1354. ● swift-format-lockwood › auto-fix › SwiftFormat returns expected auto-fix output
  1355.  
  1356. expect(received).toEqual(expected) // deep equality
  1357.  
  1358. Expected: 0
  1359. Received: 127
  1360.  
  1361. 67 |
  1362. 68 | // Exit code
  1363. > 69 | expect(cmdOutput.status).toEqual(expected.cmdOutput.status);
  1364. | ^
  1365. 70 |
  1366. 71 | // stdout
  1367. 72 | const stdout = normalizeDates(cmdOutput.stdout);
  1368.  
  1369. at Object.<anonymous> (test/linters/linters.test.js:69:30)
  1370.  
  1371. ● swift-format-lockwood › auto-fix › SwiftFormat parses auto-fix output correctly
  1372.  
  1373. expect(received).resolves.toEqual()
  1374.  
  1375. Received promise rejected instead of resolved
  1376. Rejected to value: [Error: SwiftFormat is not installed]
  1377.  
  1378. 52 |
  1379. 53 | beforeAll(async () => {
  1380. > 54 | await expect(linter.verifySetup(projectTmpDir)).resolves.toEqual(undefined);
  1381. | ^
  1382. 55 | });
  1383. 56 |
  1384. 57 | // Test lint and auto-fix modes
  1385.  
  1386. at expect (node_modules/expect/build/index.js:134:15)
  1387. at Object.<anonymous> (test/linters/linters.test.js:54:10)
  1388.  
  1389. ● swiftlint › lint › SwiftLint returns expected lint output
  1390.  
  1391. expect(received).resolves.toEqual()
  1392.  
  1393. Received promise rejected instead of resolved
  1394. Rejected to value: [Error: SwiftLint is not installed]
  1395.  
  1396. 52 |
  1397. 53 | beforeAll(async () => {
  1398. > 54 | await expect(linter.verifySetup(projectTmpDir)).resolves.toEqual(undefined);
  1399. | ^
  1400. 55 | });
  1401. 56 |
  1402. 57 | // Test lint and auto-fix modes
  1403.  
  1404. at expect (node_modules/expect/build/index.js:134:15)
  1405. at Object.<anonymous> (test/linters/linters.test.js:54:10)
  1406.  
  1407. ● swiftlint › lint › SwiftLint returns expected lint output
  1408.  
  1409. expect(received).toEqual(expected) // deep equality
  1410.  
  1411. Expected: 2
  1412. Received: 127
  1413.  
  1414. 67 |
  1415. 68 | // Exit code
  1416. > 69 | expect(cmdOutput.status).toEqual(expected.cmdOutput.status);
  1417. | ^
  1418. 70 |
  1419. 71 | // stdout
  1420. 72 | const stdout = normalizeDates(cmdOutput.stdout);
  1421.  
  1422. at Object.<anonymous> (test/linters/linters.test.js:69:30)
  1423.  
  1424. ● swiftlint › lint › SwiftLint parses lint output correctly
  1425.  
  1426. expect(received).resolves.toEqual()
  1427.  
  1428. Received promise rejected instead of resolved
  1429. Rejected to value: [Error: SwiftLint is not installed]
  1430.  
  1431. 52 |
  1432. 53 | beforeAll(async () => {
  1433. > 54 | await expect(linter.verifySetup(projectTmpDir)).resolves.toEqual(undefined);
  1434. | ^
  1435. 55 | });
  1436. 56 |
  1437. 57 | // Test lint and auto-fix modes
  1438.  
  1439. at expect (node_modules/expect/build/index.js:134:15)
  1440. at Object.<anonymous> (test/linters/linters.test.js:54:10)
  1441.  
  1442. ● swiftlint › auto-fix › SwiftLint returns expected auto-fix output
  1443.  
  1444. expect(received).resolves.toEqual()
  1445.  
  1446. Received promise rejected instead of resolved
  1447. Rejected to value: [Error: SwiftLint is not installed]
  1448.  
  1449. 52 |
  1450. 53 | beforeAll(async () => {
  1451. > 54 | await expect(linter.verifySetup(projectTmpDir)).resolves.toEqual(undefined);
  1452. | ^
  1453. 55 | });
  1454. 56 |
  1455. 57 | // Test lint and auto-fix modes
  1456.  
  1457. at expect (node_modules/expect/build/index.js:134:15)
  1458. at Object.<anonymous> (test/linters/linters.test.js:54:10)
  1459.  
  1460. ● swiftlint › auto-fix › SwiftLint returns expected auto-fix output
  1461.  
  1462. expect(received).toEqual(expected) // deep equality
  1463.  
  1464. Expected: 0
  1465. Received: 127
  1466.  
  1467. 67 |
  1468. 68 | // Exit code
  1469. > 69 | expect(cmdOutput.status).toEqual(expected.cmdOutput.status);
  1470. | ^
  1471. 70 |
  1472. 71 | // stdout
  1473. 72 | const stdout = normalizeDates(cmdOutput.stdout);
  1474.  
  1475. at Object.<anonymous> (test/linters/linters.test.js:69:30)
  1476.  
  1477. ● swiftlint › auto-fix › SwiftLint parses auto-fix output correctly
  1478.  
  1479. expect(received).resolves.toEqual()
  1480.  
  1481. Received promise rejected instead of resolved
  1482. Rejected to value: [Error: SwiftLint is not installed]
  1483.  
  1484. 52 |
  1485. 53 | beforeAll(async () => {
  1486. > 54 | await expect(linter.verifySetup(projectTmpDir)).resolves.toEqual(undefined);
  1487. | ^
  1488. 55 | });
  1489. 56 |
  1490. 57 | // Test lint and auto-fix modes
  1491.  
  1492. at expect (node_modules/expect/build/index.js:134:15)
  1493. at Object.<anonymous> (test/linters/linters.test.js:54:10)
  1494.  
  1495. Test Suites: 1 failed, 5 passed, 6 total
  1496. Tests: 52 failed, 20 passed, 72 total
  1497. Snapshots: 0 total
  1498. Time: 14.753 s
  1499. Ran all test suites.
  1500. error Command failed with exit code 1.
  1501. info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
  1502. terencedignon-macbookpro2%
Add Comment
Please, Sign In to add comment