File tree Expand file tree Collapse file tree 3 files changed +13
-4
lines changed Expand file tree Collapse file tree 3 files changed +13
-4
lines changed Original file line number Diff line number Diff line change @@ -248,3 +248,8 @@ Adds a review page for viewing tutorial content. The review page should be espec
248248- Supports commands on reset
249249- Supports running vscode commands anywhere that command line commands can be run
250250- Admin mode to allow creators to jump between tutorial levels/steps during development
251+
252+ ### [0.13.1]
253+
254+ - Add logo
255+ - Fix issue with watcher tests running on reset
Original file line number Diff line number Diff line change 1- import * as T from 'typings'
21import * as TT from 'typings/tutorial'
32import * as git from '../git'
43import loadCommits from './utils/loadCommits'
5- import loadWatchers from './utils/loadWatchers '
4+ import { loadWatchers , resetWatchers } from './utils/watchers '
65import openFiles from './utils/openFiles'
76import runCommands from './utils/runCommands'
87import runVSCodeCommands from './utils/runVSCodeCommands'
@@ -39,6 +38,7 @@ export const onSolutionEnter = async (actions: TT.StepActions): Promise<void> =>
3938}
4039
4140export const onReset = async ( actions : TT . StepActions ) : Promise < void > => {
41+ await resetWatchers ( )
4242 await runCommands ( actions ?. commands )
4343 await runVSCodeCommands ( actions ?. vscodeCommands )
4444}
Original file line number Diff line number Diff line change @@ -14,7 +14,7 @@ const disposeWatcher = (watcher: string) => {
1414 delete watcherObject [ watcher ]
1515}
1616
17- const loadWatchers = ( watchers : string [ ] = [ ] ) : void => {
17+ export const loadWatchers = ( watchers : string [ ] = [ ] ) : void => {
1818 if ( ! watchers . length ) {
1919 // remove all watchers
2020 for ( const watcher of Object . keys ( watcherObject ) ) {
@@ -55,4 +55,8 @@ const loadWatchers = (watchers: string[] = []): void => {
5555 }
5656}
5757
58- export default loadWatchers
58+ export const resetWatchers = ( ) : void => {
59+ for ( const watcher of Object . keys ( watcherObject ) ) {
60+ disposeWatcher ( watcher )
61+ }
62+ }
You can’t perform that action at this time.
0 commit comments