Skip to content

Commit 5df9a95

Browse files
committed
starter code
0 parents  commit 5df9a95

File tree

9 files changed

+60
-0
lines changed

9 files changed

+60
-0
lines changed

.github/.keep

Whitespace-only changes.

.github/workflows/autograding.yml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
name: autograding
2+
3+
on: [push]
4+
5+
jobs:
6+
build:
7+
8+
runs-on: ubuntu-latest
9+
10+
steps:
11+
- uses: actions/checkout@v3
12+
13+
- name: Use Node.js
14+
uses: actions/setup-node@v3
15+
with:
16+
node-version: '18'
17+
cache: 'npm'
18+
19+
- name: Install package dependencies
20+
run: npm install
21+
22+
- name: Create test build
23+
run: npm run build --if-present
24+
25+
- name: Execute test cases
26+
run: npm test

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
/node_modules
2+
.vscode/

.replit

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
language = "nodejs"
2+
run = "node index"

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Instructions for Assignment #0 will follow

hello.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
function hello() {
2+
// TODO: change this string so that your program prints "Hello world!"
3+
// when you hit the replit run button
4+
return "Hello!";
5+
}
6+
7+
module.exports = hello;

index.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
const hello = require('./hello');
2+
3+
console.log(hello());

package.json

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
{
2+
"name": "Assignment#0 Hello world!",
3+
"version": "1.0.0",
4+
"description": "Hello world assignment for learners to familiarize themselves with visual studio code, testing, node, and github ",
5+
"main": "index.js",
6+
"scripts": {
7+
"test": "jest"
8+
},
9+
"author": "",
10+
"license": "ISC",
11+
"devDependencies": {
12+
"jest": "^29.5.0"
13+
}
14+
}

spec/hello.spec.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
const hello = require('../hello');
2+
3+
test('Checking to see if the test outputs the correct message..', () => {
4+
expect(hello()).toBe("Hello world!");
5+
});

0 commit comments

Comments
 (0)