Loading .prettierrc 0 → 100644 +17 −0 Original line number Diff line number Diff line { "arrowParens": "always", "bracketSpacing": true, "htmlWhitespaceSensitivity": "css", "insertPragma": false, "jsxBracketSameLine": false, "jsxSingleQuote": true, "printWidth": 80, "proseWrap": "always", "quoteProps": "as-needed", "requirePragma": false, "semi": true, "singleQuote": true, "tabWidth": 2, "trailingComma": "all", "useTabs": false } test/assignment-1/test_01.js +3 −3 Original line number Diff line number Diff line import helloWorld from "../solution_01.js"; import helloWorld from '../solution_01.js'; import assert from 'assert'; describe('solution_01.js', function () { describe('helloWorld()', function () { it("should return \"Hello world!\"", function () { assert.equal(helloWorld(), "Hello world!"); it('should return "Hello world!"', function () { assert.equal(helloWorld(), 'Hello world!'); }); }); }); test/assignment-1/test_02.js +6 −6 Original line number Diff line number Diff line import sayHello from "../solution_02.js"; import assert from "assert"; import sayHello from '../solution_02.js'; import assert from 'assert'; describe("solution_02.js", function () { describe("sayHello()", function () { it("should return the correct string", function () { ["thename", "Jim", "John", "Jane"].forEach((str) => { describe('solution_02.js', function () { describe('sayHello()', function () { it('should return the correct string', function () { ['thename', 'Jim', 'John', 'Jane'].forEach((str) => { assert.equal(sayHello(str), `Hello ${str}, how are you?`); }); }); Loading test/assignment-1/test_03.js +5 −5 Original line number Diff line number Diff line import addNumbers from "../solution_03.js"; import assert from "assert"; import addNumbers from '../solution_03.js'; import assert from 'assert'; describe("solution_03.js", function () { describe("addNumbers(a, b)", function () { it("should return the correct result", function () { describe('solution_03.js', function () { describe('addNumbers(a, b)', function () { it('should return the correct result', function () { [1, 2, 3, 4, 5].forEach((num) => { assert.equal(addNumbers(num, num), num + num); }); Loading test/assignment-1/test_04.js +7 −7 Original line number Diff line number Diff line import isPositive from "../solution_04.js"; import assert from "assert"; import isPositive from '../solution_04.js'; import assert from 'assert'; describe("solution_04.js", function () { describe("isPositive(1)", function () { it("should return true", function () { describe('solution_04.js', function () { describe('isPositive(1)', function () { it('should return true', function () { assert.equal(isPositive(1), true); }); }); describe("isPositive(-1)", () => { it("should return false", () => { describe('isPositive(-1)', () => { it('should return false', () => { assert.equal(isPositive(0), false); }); }); Loading Loading
.prettierrc 0 → 100644 +17 −0 Original line number Diff line number Diff line { "arrowParens": "always", "bracketSpacing": true, "htmlWhitespaceSensitivity": "css", "insertPragma": false, "jsxBracketSameLine": false, "jsxSingleQuote": true, "printWidth": 80, "proseWrap": "always", "quoteProps": "as-needed", "requirePragma": false, "semi": true, "singleQuote": true, "tabWidth": 2, "trailingComma": "all", "useTabs": false }
test/assignment-1/test_01.js +3 −3 Original line number Diff line number Diff line import helloWorld from "../solution_01.js"; import helloWorld from '../solution_01.js'; import assert from 'assert'; describe('solution_01.js', function () { describe('helloWorld()', function () { it("should return \"Hello world!\"", function () { assert.equal(helloWorld(), "Hello world!"); it('should return "Hello world!"', function () { assert.equal(helloWorld(), 'Hello world!'); }); }); });
test/assignment-1/test_02.js +6 −6 Original line number Diff line number Diff line import sayHello from "../solution_02.js"; import assert from "assert"; import sayHello from '../solution_02.js'; import assert from 'assert'; describe("solution_02.js", function () { describe("sayHello()", function () { it("should return the correct string", function () { ["thename", "Jim", "John", "Jane"].forEach((str) => { describe('solution_02.js', function () { describe('sayHello()', function () { it('should return the correct string', function () { ['thename', 'Jim', 'John', 'Jane'].forEach((str) => { assert.equal(sayHello(str), `Hello ${str}, how are you?`); }); }); Loading
test/assignment-1/test_03.js +5 −5 Original line number Diff line number Diff line import addNumbers from "../solution_03.js"; import assert from "assert"; import addNumbers from '../solution_03.js'; import assert from 'assert'; describe("solution_03.js", function () { describe("addNumbers(a, b)", function () { it("should return the correct result", function () { describe('solution_03.js', function () { describe('addNumbers(a, b)', function () { it('should return the correct result', function () { [1, 2, 3, 4, 5].forEach((num) => { assert.equal(addNumbers(num, num), num + num); }); Loading
test/assignment-1/test_04.js +7 −7 Original line number Diff line number Diff line import isPositive from "../solution_04.js"; import assert from "assert"; import isPositive from '../solution_04.js'; import assert from 'assert'; describe("solution_04.js", function () { describe("isPositive(1)", function () { it("should return true", function () { describe('solution_04.js', function () { describe('isPositive(1)', function () { it('should return true', function () { assert.equal(isPositive(1), true); }); }); describe("isPositive(-1)", () => { it("should return false", () => { describe('isPositive(-1)', () => { it('should return false', () => { assert.equal(isPositive(0), false); }); }); Loading