Skip to content

Commit 50a7413

Browse files
committed
documentation updates from atom-coderoad@0.11 & 0.12
1 parent 633a506 commit 50a7413

File tree

3 files changed

+21
-42
lines changed

3 files changed

+21
-42
lines changed

_posts/tutorial-docs/2016-01-02-coderoad-api.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,27 @@ Add text to the bottom of the active text editor.
121121
```))
122122
```
123123

124+
### write
125+
126+
Write a file in the users project directory.
127+
File paths are relative to the users directory.
128+
129+
```markdown
130+
@action(write('file.js', 'hello world!'))
131+
// writes to 'projectWorkingDirectory/file.js'
132+
```
133+
134+
135+
### writeFromFile
136+
137+
Write a file to the users project directory by reading another file.
138+
139+
```markdown
140+
@action(writeFromFile('file.js', 'data/example.js'))
141+
// reads from 'tutorial/data/example.js'
142+
// writes to 'projectWorkingDirectory/file.js'
143+
```
144+
124145
#### ::>
125146

126147
Set the cursor position.

_posts/tutorial-docs/2016-01-03-tests.md

Lines changed: 0 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -29,44 +29,3 @@ it('should be a function')
2929
it('must be a function')
3030
it('isn\'t a function')
3131
```
32-
33-
### Loaders
34-
35-
Use a **loader** to run the user saved file in the context of your file. Think of a loader as a way to place the file your testing inside of your test file. Loaders are written as comments.
36-
37-
```js
38-
/// load('user-file.js')
39-
```
40-
41-
*Note: When using spies, stubs or mocks, initiate them above your loader call.*
42-
43-
44-
45-
### Loading Data Files
46-
47-
Data can be loaded in the user's file by loading it from your tutorial folder. Just call `load` with a second parameter, `true`.
48-
49-
Although bad practice, it can be easiest to set data to the global scope.
50-
51-
*path/to/tutorial/data/file.js
52-
53-
```js
54-
var data = 42;
55-
```
56-
57-
*test.spec.js*
58-
59-
```
60-
/// load('data/file.js', true)
61-
/// load('user-file.js')
62-
63-
/* tests here */
64-
```
65-
66-
Users can access global data by name in their file.
67-
68-
*user-file.js*
69-
70-
```js
71-
var secret = data - 1;
72-
```

_posts/tutorial-docs/2016-01-09-test-runner.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ In this way, the test runner not only determines how unit tests will be written,
1414
### Current Test Runners
1515

1616
* Javascript: [*mocha-coderoad*](//github.com/coderoad/mocha-coderoad)
17-
* Python: [*pytest-coderoad*](//github.com/coderoad/pytest-coderoad)
1817

1918
We need more test runners. Why not build one?
2019

0 commit comments

Comments
 (0)