Skip to content

Commit 7f4630e

Browse files
committed
docs updates, edits
1 parent 6a43fc8 commit 7f4630e

File tree

5 files changed

+22
-22
lines changed

5 files changed

+22
-22
lines changed

_includes/docs/docs.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,11 @@
1212
<h1 id="overview" class="page-header">Overview</h1>
1313

1414
<blockquote>
15-
CodeRoad aims to make building & sharing interactive tutorials as easy as possible.
15+
CodeRoad aims to make building & sharing interactive coding tutorials as easy as possible.
1616
</blockquote>
1717

18-
<div class="lead">We hope to create fun and maintainable coding tutorials that actually improve with time. We hope to see students become teachers, teachers become empowered, and coders become better, faster. But first, let's get some interactive tutorials built.
19-
That's where you come in.</div>
18+
<div class="lead">We hope to create fun and maintainable code tutorials that actually improve with time. We hope to see programming students become teachers, teachers become empowered, and coders become better, faster. But first, let's get some interactive coding tutorials built.
19+
That's where you come in.</div>
2020

2121
<a href="/build" class="btn btn-default btn-lg"><i class="fa fa-road fa-fw"></i> <span class="network-name">Read an Overview of Building a Tutorial</span></a>
2222
</section>

_posts/2016-01-04-coderoad-api.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -62,11 +62,10 @@ See an [example](https://github.com/coderoad/coderoad-functional-school/blob/mas
6262

6363
### `@hint`
6464

65-
*@hint* loads a string (or array of strings) which can be used to provide hints for the user. The order of hints is important: first in, first out.
65+
*@hint* loads a string which can be used to provide hints for the user. The order of hints is important: first in, first out.
6666

6767
```markdown
6868
@hint('A hint for the user')
69-
@hint(['Hint 1', 'Hint 2'])
7069

7170
*@hint* may use code-blocks with syntax highlighting, but they must be wrapped in quotes.
7271

@@ -121,4 +120,4 @@ Add text to the bottom of the active text editor.
121120

122121
#### What's Next
123122

124-
More editor actions will be added to CodeRoad at a later date.
123+
More editor actions will be added to CodeRoad at a later date. These may include changing the cursor position, replacing content, decorating keywords, etc.

_posts/2016-01-06-loaders.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@ id: loaders-snippets
55
file: 2016-01-06-loaders.md
66
---
77

8-
Tutorials may be written in different programming languages or for different compilers, so there isn't yet a standard way to load data from user created files. Instead, you'll have to load your own solution into your tutorial and link to them from your test file. Rolling your own solution allows you to load data in a way that fits your project.
8+
Tutorials may be written in different programming languages or for different compilers, so there isn't yet a standard way to load data from user created files. Instead, you'll have to load/transpile your files for the test runner. Rolling your own solution allows you to load data in a way that fits your project.
99

10-
These snippets should help:
10+
There may be a simpler approach in the future, but for now these snippets should help:
1111

1212

1313
#### loadJS (JavaScript)

_posts/2016-01-08-config.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ CodeRoad tutorial configurations can be set in the *package.json* config.
1717
}
1818
```
1919

20-
This section will likely expand in the future. For now, let's go over some of these.
20+
This section will likely expand in the future. For now, let's go over some of the configurations.
2121

2222
#### testDir
2323

_posts/2016-01-10-test-runner.md

Lines changed: 14 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,11 @@ title: Test Runners
44
id: test-runners
55
file: 2016-01-10-test-runner.md
66
---
7-
A test runner works by creating a child process and calling a test framework with target files.
7+
A CodeRoad test runner works by creating a child process and calling a test framework with target files, then returning the result as a JSON object.
88

99
In this way, the test runner not only determines how unit tests will be written, but it actually determines the programming language used in the tutorial.
1010

11-
> Any programming language could be used with CodeRoad, you need only change the test runner.
11+
> Any programming language can potentially be used with CodeRoad, you need only change the test runner.
1212
1313
### Current Test Runners
1414

@@ -18,13 +18,13 @@ We need more test runners. Why not build one?
1818

1919
### How to Build a New Test Runner
2020

21-
If you're interested in helping CodeRoad support a programming language of your choice, here's how to set up the test runner.
21+
If you're interested in helping CodeRoad support a different programming language or test framework of your choice, here's how to set up the test runner.
2222

23-
The test runner should spawn a child process. Think of this like your program opening up a terminal, typing in command line commands, then collecting and returning the the results to *Atom-CodeRoad*. See [an example child process created in *mocha-coderoad*](https://github.com/coderoad/mocha-coderoad/blob/master/src/create-runner.ts).
23+
The test runner should spawn a child process. Think of this like your program opening up a terminal, typing in some command line commands to run tests, then collecting and returning the the results to *Atom-CodeRoad*. See [an example child process created inside of Atom for *mocha-coderoad*](https://github.com/coderoad/mocha-coderoad/blob/master/src/create-runner.ts).
2424

25-
The test runner is called with four ordered inputs, two of which act as callback functions that return the log & result to *Atom-CodeRoad*.
25+
The test runner is called in *Atom-CodeRoad* with four ordered inputs, two of which act as callback functions that return the log or result.
2626

27-
See a brief example from the [*mocha-coderoad* runner](https://github.com/coderoad/mocha-coderoad/blob/master/src/runner.ts).
27+
See a brief example from the [*mocha-coderoad* runner](https://github.com/coderoad/mocha-coderoad/blob/master/src/runner.ts), as well as a code summary below:
2828

2929
```js
3030
export default function runner(testFile, config, handleResult, handleLog) {
@@ -35,15 +35,15 @@ export default function runner(testFile, config, handleResult, handleLog) {
3535
}
3636
```
3737

38-
Let's look at these four inputs in more detail.
38+
Let's look at these four test runner inputs in more detail.
3939

4040
#### 1. testFile
4141

42-
The absolute path to a file containing all concatenated page tests. Call your test framework with this.
42+
The absolute path to a file containing all concatenated page tests. Call your test framework with this file path.
4343

4444
#### 2. config
4545

46-
A JSON object of configurations, see an example below
46+
A JSON object of configurations that may be needed for setting up your runner. See an example below:
4747

4848
```json
4949
{
@@ -56,7 +56,10 @@ A JSON object of configurations, see an example below
5656

5757
#### 3. handleResult
5858

59-
A callback function that should be called with the **result** object. Results should either pass if all pass, or fail if any test fails.
59+
A callback function that should be called with the **result** object. Results should pass if all tests pass, or fail if even a single test fails.
60+
61+
The result should output the *taskPosition* after the test. The field *change* represents the difference between the starting 'taskPosition' and the resulting 'taskPosition'.
62+
6063

6164
##### pass
6265

@@ -69,8 +72,6 @@ A callback function that should be called with the **result** object. Results sh
6972
}
7073
```
7174

72-
The result should output the 'taskPosition' after the test. 'change' represents the difference between the starting 'taskPosition' and the resulting 'taskPosition'.
73-
7475
##### fail
7576

7677
```json
@@ -85,6 +86,6 @@ The result should output the 'taskPosition' after the test. 'change' represents
8586

8687
#### 4. handleLog
8788

88-
A callback function that should be called with a string **log** statement
89+
A callback function that should return the output **log** statement.
8990

9091
*If you need help setting up a new test runner, please send an email to coderoadapp@gmail.com.*

0 commit comments

Comments
 (0)