Closed geromyc closed 1 month ago
api_access - Need to figure out and add a mock octokit. main - Cannot assign urlFileParser because it is a read-only property. (Likely another mock issue) metric - Type 'Logger' is not assignable to type 'MockedObject'. repository - Issue when it goes to run test that it attempts to run actual script and import variables from metric.js through repository.ts. Needs a mock of class for Url, NetScore, RampUp, Correctness, BusFactor, ResponsiveMaintainer and License. urlFileParser - Tries to load Logger variable similar to above.
Updating for documentation later. This is what Jonah sent in Discord last night for progress. He got urlFileParser.ts passing the test, but with one caveat. The change he needed to make in the main code broke it. He encountered the same issue as me earlier in the week; the calls in the source files requiring the .js extension when importing at the top of their files. The only known easy fix was to remove the .js and break the main code.
As of this morning I seem to have found a way around the .js issue, still needs further testing, but I also got repository passing with all 100%!
Will update at end of day after I have done some more work.
PS C:\Users\Geromy\OneDrive\Documents\VS_Code\ECE461\Software-Engineering-Project> pnpm test
FAIL test/repository.test.ts ● Test suite failed to run
PASS test/logger.test.ts PASS test/output.test.ts
FAIL test/api_access.test.ts ● Test suite failed to run
FAIL test/urlFileParser.test.ts ● Test suite failed to run
FAIL test/metric.test.ts ● Test suite failed to run
FAIL test/main.test.ts ● Test suite failed to run
Test Suites: 5 failed, 2 passed, 7 total Tests: 5 passed, 5 total Snapshots: 0 total Time: 5.367 s Ran all test suites.