From d78ae4bc8ba372c08aa3f86468b6d5c9c2ca8799 Mon Sep 17 00:00:00 2001 From: "github-classroom[bot]" <66690702+github-classroom[bot]@users.noreply.github.com> Date: Tue, 18 May 2021 19:04:24 +0000 Subject: [PATCH 1/8] Initial commit --- .gitignore | 2 + .replit | 2 + hello.js | 7 +++ index.js | 3 ++ package-lock.json | 99 +++++++++++++++++++++++++++++++++++++++ package.json | 14 ++++++ spec/hello.spec.js | 11 +++++ spec/support/jasmine.json | 11 +++++ 8 files changed, 149 insertions(+) create mode 100644 .gitignore create mode 100644 .replit create mode 100644 hello.js create mode 100644 index.js create mode 100644 package-lock.json create mode 100644 package.json create mode 100644 spec/hello.spec.js create mode 100644 spec/support/jasmine.json diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..31f0a98 --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +/node_modules +.vscode/ \ No newline at end of file diff --git a/.replit b/.replit new file mode 100644 index 0000000..4fc945f --- /dev/null +++ b/.replit @@ -0,0 +1,2 @@ +language = "nodejs" +run = "node index" \ No newline at end of file diff --git a/hello.js b/hello.js new file mode 100644 index 0000000..381fef8 --- /dev/null +++ b/hello.js @@ -0,0 +1,7 @@ +function hello() { + // TODO: change this string so that your program prints "Hello world!" + // when you hit the replit run button + return "Hello!"; +} + +module.exports = hello; \ No newline at end of file diff --git a/index.js b/index.js new file mode 100644 index 0000000..9d83de8 --- /dev/null +++ b/index.js @@ -0,0 +1,3 @@ +const hello = require('./hello'); + +console.log(hello()); diff --git a/package-lock.json b/package-lock.json new file mode 100644 index 0000000..a0e1c9f --- /dev/null +++ b/package-lock.json @@ -0,0 +1,99 @@ +{ + "name": "sample-assignment", + "version": "1.0.0", + "lockfileVersion": 1, + "requires": true, + "dependencies": { + "balanced-match": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz", + "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=" + }, + "brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "requires": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "concat-map": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", + "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=" + }, + "fs.realpath": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", + "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=" + }, + "glob": { + "version": "7.1.6", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.6.tgz", + "integrity": "sha512-LwaxwyZ72Lk7vZINtNNrywX0ZuLyStrdDtabefZKAY5ZGJhVtgdznluResxNmPitE0SAO+O26sWTHeKSI2wMBA==", + "requires": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.0.4", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + } + }, + "inflight": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", + "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", + "requires": { + "once": "^1.3.0", + "wrappy": "1" + } + }, + "inherits": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==" + }, + "jasmine": { + "version": "3.6.4", + "resolved": "https://registry.npmjs.org/jasmine/-/jasmine-3.6.4.tgz", + "integrity": "sha512-hIeOou6y0BgCOKYgXYveQvlY+PTHgDPajFf+vLCYbMTQ+VjAP9+EQv0nuC9+gyCAAWISRFauB1XUb9kFuOKtcQ==", + "requires": { + "glob": "^7.1.6", + "jasmine-core": "~3.6.0" + } + }, + "jasmine-core": { + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/jasmine-core/-/jasmine-core-3.6.0.tgz", + "integrity": "sha512-8uQYa7zJN8hq9z+g8z1bqCfdC8eoDAeVnM5sfqs7KHv9/ifoJ500m018fpFc7RDaO6SWCLCXwo/wPSNcdYTgcw==" + }, + "minimatch": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", + "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", + "requires": { + "brace-expansion": "^1.1.7" + } + }, + "once": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", + "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", + "requires": { + "wrappy": "1" + } + }, + "path-is-absolute": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", + "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=" + }, + "wrappy": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", + "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=" + } + } +} diff --git a/package.json b/package.json new file mode 100644 index 0000000..2053b54 --- /dev/null +++ b/package.json @@ -0,0 +1,14 @@ +{ + "name": "sample-assignment", + "version": "1.0.0", + "description": "Sample Assignment for independent students to familiarize themselves with GitHub Classroom workflow", + "main": "index.js", + "scripts": { + "test": "jasmine" + }, + "author": "", + "license": "ISC", + "dependencies": { + "jasmine": "^3.6.4" + } +} diff --git a/spec/hello.spec.js b/spec/hello.spec.js new file mode 100644 index 0000000..660b0f0 --- /dev/null +++ b/spec/hello.spec.js @@ -0,0 +1,11 @@ +const hello = require('../hello'); + +describe("Assignment Sample solution", function() { + + it("outputs the correct message", function() { + expect(hello()).toBe("Hello world!"); + }); + + + + }); \ No newline at end of file diff --git a/spec/support/jasmine.json b/spec/support/jasmine.json new file mode 100644 index 0000000..d1b48a6 --- /dev/null +++ b/spec/support/jasmine.json @@ -0,0 +1,11 @@ +{ + "spec_dir": "spec", + "spec_files": [ + "**/*[sS]pec.js" + ], + "helpers": [ + "helpers/**/*.js" + ], + "stopSpecOnExpectationFailure": false, + "random": true +} From 70b5bc7e1509e29cad2d85c629d216f4b8203f3d Mon Sep 17 00:00:00 2001 From: "github-classroom[bot]" <66690702+github-classroom[bot]@users.noreply.github.com> Date: Tue, 18 May 2021 19:04:26 +0000 Subject: [PATCH 2/8] GitHub Classroom Autograding --- .github/classroom/autograding.json | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 .github/classroom/autograding.json diff --git a/.github/classroom/autograding.json b/.github/classroom/autograding.json new file mode 100644 index 0000000..13ff79e --- /dev/null +++ b/.github/classroom/autograding.json @@ -0,0 +1,14 @@ +{ + "tests": [ + { + "name": "Grading Tests", + "setup": "npm install", + "run": "npm test", + "input": "", + "output": "", + "comparison": "included", + "timeout": 10, + "points": 1 + } + ] +} \ No newline at end of file From 16dfe83ff50c719ce85f59fc98d84852fae69dab Mon Sep 17 00:00:00 2001 From: "github-classroom[bot]" <66690702+github-classroom[bot]@users.noreply.github.com> Date: Tue, 18 May 2021 19:04:26 +0000 Subject: [PATCH 3/8] GitHub Classroom Autograding Workflow --- .github/workflows/classroom.yml | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 .github/workflows/classroom.yml diff --git a/.github/workflows/classroom.yml b/.github/workflows/classroom.yml new file mode 100644 index 0000000..8e05703 --- /dev/null +++ b/.github/workflows/classroom.yml @@ -0,0 +1,11 @@ + name: GitHub Classroom Workflow + + on: [push] + + jobs: + build: + name: Autograding + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - uses: education/autograding@v1 From 3046f8ee6bc0036686ab60e572fa68ea4463ea24 Mon Sep 17 00:00:00 2001 From: "github-classroom[bot]" <66690702+github-classroom[bot]@users.noreply.github.com> Date: Tue, 18 May 2021 19:04:27 +0000 Subject: [PATCH 4/8] Add online IDE url --- README.md | 1 + 1 file changed, 1 insertion(+) create mode 100644 README.md diff --git a/README.md b/README.md new file mode 100644 index 0000000..a128857 --- /dev/null +++ b/README.md @@ -0,0 +1 @@ +[![Work in Repl.it](https://classroom.github.com/assets/work-in-replit-14baed9a392b3a25080506f3b7b6d57f295ec2978f6f33ec97e36a161684cbe9.svg)](https://classroom.github.com/online_ide?assignment_repo_id=4780231&assignment_repo_type=AssignmentRepo) From 9b7d702a20e568dffc2a003a2ab0b25a8248147b Mon Sep 17 00:00:00 2001 From: "github-classroom[bot]" <66690702+github-classroom[bot]@users.noreply.github.com> Date: Tue, 18 May 2021 19:04:28 +0000 Subject: [PATCH 5/8] GitHub Classroom Feedback --- .github/.keep | 0 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 .github/.keep diff --git a/.github/.keep b/.github/.keep new file mode 100644 index 0000000..e69de29 From 4a0a5b1d32f67fb062cf52d2c5c6fc980aa14fb8 Mon Sep 17 00:00:00 2001 From: "github-classroom[bot]" <66690702+github-classroom[bot]@users.noreply.github.com> Date: Tue, 18 May 2021 19:04:28 +0000 Subject: [PATCH 6/8] Setting up GitHub Classroom Feedback From 471f55d687a7f6ee45126b4871ec549996ecd0dc Mon Sep 17 00:00:00 2001 From: John Woolbright Date: Tue, 18 May 2021 19:11:13 +0000 Subject: [PATCH 7/8] adding "world" to the return string --- hello.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hello.js b/hello.js index 381fef8..e73ae9d 100644 --- a/hello.js +++ b/hello.js @@ -1,7 +1,7 @@ function hello() { // TODO: change this string so that your program prints "Hello world!" // when you hit the replit run button - return "Hello!"; + return "Hello world!"; } module.exports = hello; \ No newline at end of file From 86f9f3e18bc3ee130a7dd741494407d47fa4aa02 Mon Sep 17 00:00:00 2001 From: John Woolbright Date: Thu, 15 Jun 2023 14:07:29 -0500 Subject: [PATCH 8/8] updates for assignment 0, changed test from jasmine to jest --- README.md | 2 +- hello.js | 4 ++-- package.json | 10 +++++----- spec/hello.spec.js | 12 +++--------- spec/support/jasmine.json | 11 ----------- 5 files changed, 11 insertions(+), 28 deletions(-) delete mode 100644 spec/support/jasmine.json diff --git a/README.md b/README.md index a128857..2a8108c 100644 --- a/README.md +++ b/README.md @@ -1 +1 @@ -[![Work in Repl.it](https://classroom.github.com/assets/work-in-replit-14baed9a392b3a25080506f3b7b6d57f295ec2978f6f33ec97e36a161684cbe9.svg)](https://classroom.github.com/online_ide?assignment_repo_id=4780231&assignment_repo_type=AssignmentRepo) +Instructions for Assignment #0 will follow diff --git a/hello.js b/hello.js index e73ae9d..bb228a3 100644 --- a/hello.js +++ b/hello.js @@ -1,7 +1,7 @@ function hello() { // TODO: change this string so that your program prints "Hello world!" // when you hit the replit run button - return "Hello world!"; + return "Hello!"; } -module.exports = hello; \ No newline at end of file +module.exports = hello; diff --git a/package.json b/package.json index 2053b54..cb89446 100644 --- a/package.json +++ b/package.json @@ -1,14 +1,14 @@ { - "name": "sample-assignment", + "name": "Assignment#0 Hello world!", "version": "1.0.0", - "description": "Sample Assignment for independent students to familiarize themselves with GitHub Classroom workflow", + "description": "Hello world assignment for learners to familiarize themselves with visual studio code, testing, node, and github ", "main": "index.js", "scripts": { - "test": "jasmine" + "test": "jest" }, "author": "", "license": "ISC", - "dependencies": { - "jasmine": "^3.6.4" + "devDependencies": { + "jest": "^29.5.0" } } diff --git a/spec/hello.spec.js b/spec/hello.spec.js index 660b0f0..e168f92 100644 --- a/spec/hello.spec.js +++ b/spec/hello.spec.js @@ -1,11 +1,5 @@ const hello = require('../hello'); -describe("Assignment Sample solution", function() { - - it("outputs the correct message", function() { - expect(hello()).toBe("Hello world!"); - }); - - - - }); \ No newline at end of file +test('Checking to see if the test outputs the correct message..', () => { + expect(hello()).toBe("Hello world!"); +}); diff --git a/spec/support/jasmine.json b/spec/support/jasmine.json deleted file mode 100644 index d1b48a6..0000000 --- a/spec/support/jasmine.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "spec_dir": "spec", - "spec_files": [ - "**/*[sS]pec.js" - ], - "helpers": [ - "helpers/**/*.js" - ], - "stopSpecOnExpectationFailure": false, - "random": true -}