Skip to content

Commit c27af2a

Browse files
committed
fix demo setup
1 parent 474ef19 commit c27af2a

File tree

6 files changed

+26
-19
lines changed

6 files changed

+26
-19
lines changed

setup/tutorial/01/01.spec.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
var expect = require('chai').expect;
22

3+
/// load('01/data.js', true)
34
/// load('page-01.js')
45

56
describe('01 addOne', function() {

setup/tutorial/01/data.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
global.something = {
2+
some: 'data'
3+
};

setup/tutorial/01/page-one.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
## Add & Subtract
2-
32
Writing basic functions.
43

54
A function has inputs and outputs. The inputs we call "parameters" and wrap them in `(` brackets `)`.
@@ -18,6 +17,8 @@ Try making your own basic functions.
1817

1918
+ write a function `addOne` that adds one to a number
2019
@test('01/01')
20+
@hint('return the parameter + 1')
21+
@hint('second hint')
2122
@action(open('page-01.js'))
2223
@action(set(
2324
```
@@ -30,6 +31,7 @@ function addOne(x) {
3031

3132
+ write a function `subtractOne` that subtracts one from a number
3233
@test('01/02')
34+
@hint('return the parameter - 1')
3335
@action(insert(
3436
```
3537
@@ -39,3 +41,5 @@ function subtractOne(x) {
3941
}
4042
```
4143
))
44+
45+
@onPageComplete('Continue to learn more about multiply & divide')

setup/tutorial/02/01.spec.js

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,24 @@
11
var expect = require('chai').expect;
22

3-
// load('page-02.js')
3+
/// load('page-02.js')
44

55
describe('01 divideOne', function() {
66

7-
it('doesn\'t exist', function() {
8-
expect(divideOne).to.be.defined;
9-
});
7+
it('doesn\'t exist', function () {
8+
expect(divideOne).to.be.defined;
9+
});
1010

11-
it('should take a parameter', function() {
12-
expect(divideOne).to.have.length(1);
13-
});
11+
it('should take a parameter', function() {
12+
expect(divideOne).to.have.length(1);
13+
});
1414

15-
it('doesn\'t output a number', function() {
16-
expect(divideOne(1)).to.be.a('number');
17-
});
15+
it('doesn\'t output a number', function () {
16+
expect(divideOne(1)).to.be.a('number');
17+
});
1818

19-
it('returns the same number', function() {
20-
expect(divideOne(1)).to.equal(1);
21-
expect(divideOne(10)).to.equal(10);
22-
});
19+
it('returns the same number', function() {
20+
expect(divideOne(1)).to.equal(1);
21+
expect(divideOne(10)).to.equal(10);
22+
});
2323

2424
});

setup/tutorial/02/page-two.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
## Divide & Multiply
2-
32
Writing basic functions continued.
43

54
We'll write two more basic functions, this time without any help.
@@ -13,7 +12,7 @@ We'll write two more basic functions, this time without any help.
1312
function divideOne(x) {
1413
return ::>
1514
}
16-
```
15+
```
1716
))
1817

1918
+ write a function `mutiplyone` that multiplies a number by 1

setup/tutorial/tutorial.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
# Tutorial Title
2-
Tutorial description.
1+
# Project Title
2+
Project description.
33

44
@import('01/page-one')
55
@import('02/page-two')

0 commit comments

Comments
 (0)