-
Notifications
You must be signed in to change notification settings - Fork 0
/
suman-todos.txt
executable file
·1262 lines (811 loc) · 39.8 KB
/
suman-todos.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
///
To ask Henry:
DI pattern from SO / Codereview
parallel sourcing of deps - how to call shared fns only once
///
add a propaganda link in the Suman docs - showing:
the difference!
1:1 process to test file
///
TODO: improve delay/resume so that it works with inject
///
if using macro and more than 1 Test.create, all of those will be called.
///
=> DI =>
for create:
source userData from suman.once.pre.js / arguments passed via macros -
$ioc, $pre and $macro should be reserved
source inject/before/after, etc
source ioc,
then, if allow top-level-deps, then source those
finally core modules,
if no match, throw error
for describe:
source inject/before/after, etc
source injections (check to ensure that injections are not reserved keywords)
source top-level
source core-modules
///
if using runner, stderr from test case fails should still be written
///
http://stackoverflow.com/a/34703425/1223975
///
https://docs.docker.com/swarm/reference/swarm/
////
if there are any test errors or warnings, print out a link
to the relavent log files
if there is one test error, pass the exact link to that file
if there are multiple errors, just print a link to test/_suman/logs/tests directory
if there is no stderr for a test, we should delete the file in the /tests directory
////
use child unref after all children have exited in suman runner
By default, the parent will wait for the detached child to exit. To prevent the parent from waiting for a given child,
use the child.unref() method. Doing so will cause the parent's event loop to not include the child in its reference count,
allowing the parent to exit independently of the child, unless there is an established IPC channel between the child and parent.
///
top-level can see IOC injections, other describe blocks can only see inject functions,
thus, no conflict
///
proper plugin system for suman
https://github.com/substack/tape/issues/341#issuecomment-273993725
////
end-to-end front-end testing:
https://twitter.com/mpjme/status/811184862954737665
/////
https://github.com/nodejs/help/issues/389
////
var timesFunction = function(callback) {
if (typeof callback !== 'function' ) {
throw new TypeError('Callback is not a function');
} else if( isNaN(parseInt(Number(this.valueOf()))) ) {
throw new TypeError('Object is not a valid number');
}
for (var i = 0; i < Number(this.valueOf()); i++) {
callback(i);
}
};
Number.prototype.times = timesFunction;
//////
if path does not exist, check to see if path exists directly in test/test-src
create auto-complete after typing with suman to test-src dir, so user does not have to type
test/test-src all the time
///
data from pre should be separate from ioc data - that way if the user requests the pre data, but did not
use any pre: [] options, an error will be thrown or at least a warning will be logged
////
guarantee that suman.once.pre.js callbacks are run in series in the order in which they are declared
///
we should maintain that series block which forces tests to run in series, that way multiple devs
working on the same project know that it will be ok to make things async if the series block is already there
///
assert that a test takes a certain amount of time, if the test runs too fast, it is likely running
synchronously, or some async feature is not working correctly
///
DI should work suman.hooks.js, so you can inject suite, before, after, etc
///
should have hook for each root suite, so we can inject ids
////
add the ability to make an after hook the last hook, or first hook, despite the order in which it was registered,
same with before hook (make it run first or last)
///
npm de-dupe => https://docs.npmjs.com/cli/dedupe
////
closure compiler:
https://developers.google.com/closure/compiler/
////
set -e at top of bash script
https://www.quora.com/When-writing-a-shell-script-how-do-you-verify-that-a-command-completes-successfully
////
git.io shortlinks / tinyurls, as in (https://git.io/vMUyr)
////
=> have to ask npm why if we run npm test in child process, that the process.send doesn't work
/////
runner stdio => pipe results to parent
////
cd suman-test/suman-test-projects && suman $(find subprojects -mindepth 2 -maxdepth 2 -name "test.sh" | xargs ) --concurrency=1
////
need to accumulate errors and show them at the end, whether it's the runner or with suman
////
if you point the suman runner to directories, and the directory has suman_test.sh, suman will run that?
no, just point suman to suman_test.sh, yourself!
////
incorporate suman.order.js with suman.groups.js
////
use suman-server for suman optional dependencies install mutex, in place of lockfile
////
add do's and do not's to readme
////
//TODO: create suman --diagnostics option at command line to check for common problems with both project and test suites
// list of checks
1. testSrcDir and testTargetDir need to be same level
2. if suman or suman/logs does not exist, need to tell user to install suman (or suman should create if they don't exist)
/////
http://www.2ality.com/2015/03/no-promises.html
/////
run mocha tests in browser - use child process
=> browser tests should be => test.browser.js
////
http://www.thegeekstuff.com/2010/11/50-linux-commands/
http://www.thegeekstuff.com/2010/08/ipcs-command-examples/
/////
instead of use-server, use-babel, use-whatever, we try to use require.resolve(),
and if not, we install them on the fly
/////
suman-test-projects => should work suman#dev and suman#staging and suman#master
////
websockets in java
https://github.com/firebase/TubeSock
/////
https://github.com/integrations/feature/continuous-integration
/////
ava stores the babel .cache in node_modules/.cache/ava
/////
use pkill to kills suman procs
/////
npm install material-ui@next
npm @next vs @latest
/////
suman-meta => uses git-clone-all-org-repos and then runs the build.sh file, which should checkout all the right branches from remote repo.
/////
https://github.com/avajs/ava/issues/1147
/////
java / spark / go / python
//////
SUMAN_SINGLE_PROCESS needs to forbid non-js file
//////////
=>
*default
=>
{ host: '127.0.0.1', port: 6969 }
//////////
debugging with node debug <pid> etc
https://github.com/nodejs/help/issues/363#issuecomment-260213843
////////
http://stackoverflow.com/questions/31578446/running-a-script-inside-a-docker-container-using-shell-script
http://timmurphy.org/2015/02/27/running-multiple-programs-in-a-docker-container-from-the-command-line/
suman.groups.js =>
if container:
1. script => use -c option to execute script in already running container?
2. getPathToScript => copy the script to entrypoint
3. run => if they use useContainer:true, seems like we always need these functions to be defined
build
choose either getPathToScript, or getListOfTestFiles
=> either suman will just run the script in a container, or suman will autogenerate a script file
then run that in a container, based off of the list of test files
use kubernetes to run tests on different nodes in a cluster
http://kubernetes.io/docs/getting-started-guides/minikube/
/////////
TODO: incorporate nyc also as example, make sure it works
todo: make coverage take one argument --coverage istanbul --coverage nyc
/////////
//if base directory is not home or users, then we are installing globally, so always install all
//TODO: what about NVM?
////////
each language option should be a plugin, each plugin needs to have an entrypoint
enable writing tests in any language, as long as the child process fulfills the IPC contract
////////
cd suman && npm install suman -f // force
/////
refactor FILE_IS_NOT_DOT_JS => FILE_IS_NOT_ACCEPTED_EXTENSION
/////
if npm root -g is in user home, maybe we can use that cache instead (probably not)
////
send usage data to slack (create app to track data)
/////
we want a separate script to checkout master, run tests, then publish
right now we have an npm publish script which might make staging the published branch instead of master
even though master and staging should never be different
/////
suman-to-tap => just like suman-troubleshoot, will distill/translate output to only the tap output (?)
////
if not installing as daemon - should only install the deps explicitly declared in suman.conf.js
in other words - if suman.conf.js is not present - install all deps as daemon,
if it is present, only install deps declared as foreground process
////
test-errors should be created whenever suman is run
/////
top level dependencies in package.json could be auto sourced in callback function
////
source modules from ~/.npm cache if we can't find them in ~/.suman/node_modules
/////
if project with suman as a dependency are being installed in parallel, then .suman/node_modules will be
written to in parallel, need to mitigate this (hopefully the queue works)
if someone is installing project for first time (ie, no suman.conf.js file), then we should install all
optional deps as a daemon process.
/////
require.resolve('istanbul') - we want executable, not package.json.main
https://github.com/nodejs/help/issues/388
https://github.com/nodejs/help/issues/389
https://www.npmjs.com/package/which
//////
watch should be on a per terminal basis, when user closes terminal, they stop watching
///////
create symbolic link from ~/.suman/node_modules/.bin/istanbul to ./node_modules/.bin/istanbul
http://stackoverflow.com/questions/1951742/how-to-symlink-a-file-in-linux
///////
~/suman/test_results are still being written out
///////
in --interactive, on final countdown from 10, only listen for backspace event instead of all stdin keys
///////
we can use npm link to link ~/.suman/node_modules
this *may* install the binaries from ~/.suman/node_modules to the local project (?)
only need those if the user wants to run them
not a good idea beacuse if user deletes node_modules dir, then we will have to call npm link again
/////
if user is root, can we write .suman directory to ~/.suman?
//////
because Poolio depends on Suman, we might need to install suman with --production / --only-production flag
///////
pnpm, ied => https://github.com/tapjs/node-tap/issues/333#issuecomment-264680790
///////
TODO: when running require('suman'), it will try to load suman.conf.js, which is bad when trying to run init!
it will throw an error if suman.conf.js does not exist
/////////
https://www.digitalocean.com/community/tutorials/how-to-install-and-use-docker-on-ubuntu-16-04
////////
https://semver.npmjs.com/
///////////
https://medium.com/@mbostock/prereleases-and-npm-e778fc5e2420#.v7sfbacbc
/////////
http://stackoverflow.com/questions/40902445/using-variable-interpolation-in-string-in-docker/40903689#40903689
/////////
=> suman should write out .suman-babelrc always ?
we need babel to support different paths to .babelrc files
////////
tail multiple files:
http://www.thegeekstuff.com/2009/09/multitail-to-view-tail-f-output-of-multiple-log-files-in-one-terminal
/////////
=> load suman-inquirer and suman-inquirer-directory from NPM instead of installing first
///////
=> Cache dependencies => https://docs.npmjs.com/cli/cache, instead of writing them to .suman/node_modules
/////////
creating documentation site:
https://code.google.com/p/gitiles/
/////////
headless chrome browser
https://gist.github.com/addyosmani/5336747
>>>> this >>>> https://chromium.googlesource.com/chromium/src/+/lkgr/headless/README.md
https://github.com/dhamaniasad/HeadlessBrowsers
/////////
npm ls x
npm la x // list dependencies in your project that depend on x
////////////
need to make suman.load() work with relative paths
///////////
Docker:
https://www.ctl.io/developers/blog/post/dockerfile-entrypoint-vs-cmd/
/////////////
send the exit code with each FATAL message to runner, so that we don't print unnecessary errors
in the runner for tests that are expected to exit with a certain non-zero exit code
////////////
C++ addons for speed
https://medium.com/developers-writing/how-to-get-a-performance-boost-using-node-js-native-addons-fd3a24719c85#.ko1c8huw8
///////////
test macros, important
///////////
readlink => need to install it on a mac
in init, need to run "which readlink", if it's not there, need to log big red warning
//////////
expect a 56 error for this test - or maybe TEST_ERROR_AND_BAIL_IS_TRUE: 80,
/Users/Olegzandr/WebstormProjects/oresoftware/suman/test/testsrc/es5-es6/build-recursion-tests/empty.test.js
////////
suman is sending the runner the same errors twice (process.send())
https://www.dropbox.com/s/kr6x1c0d3a5ccpg/Screenshot%202016-11-28%2014.54.55.png?dl=0
////////
if we use SUMAN_SINGLE_PROCESS=yes, if suman tests spawn suman tests, then those will be forced to be SSP also
because of nature of environment vars.
////////
https://www.ctl.io/developers/blog/post/dockerfile-entrypoint-vs-cmd/
///////
add labjs to readme tables
/////////
http://unix.stackexchange.com/questions/34273/can-i-pipe-stdout-on-one-server-to-stdin-on-another-server
utilize multiple machines in a local network, instead of running 100 tests on one machine, or whatever
how to do this? suman code shouldn't have to change, instead, we create different bash scripts
/////////
add to docs:
Preventing false negatives
preventing false positives
/////////
expected exit codes => need to work on it
////////////
if user calls t.done() and there is no cb, this.test.cb, should log warnings
////////////
spawn child process, make sure no_silent or whatever options are available
1. file
2. silent /dev/null
3. inherit
(1) the parent process should just inherit the stdio from the children so that it's all logged in the original terminal,
(2) to send the stdio to a file, or
(3) send all stdio to /dev/null
///////////
implement:
enforceTestCaseNames: true,
enforceBlockNames: true,
////////
debugStrm
const debugStrm = fs.createWriteStream(path.resolve(global.sumanHelperDirRoot + '/logs/suman-debug.log'));
/////////
how to use babel vs babel-node
https://github.com/babel/example-node-server
//////////
http://stackoverflow.com/questions/3601515/how-to-check-if-a-variable-is-set-in-bash
/////////////
http://stackoverflow.com/questions/40800418/resolving-path-with-bash/40800713?noredirect=1#comment68825967_40800713
/////////
if Suman usage warning: no suman.once.pre.js file found
then if there are any integrants/pre: [], we have to throw an error
//////////
syntax highlighting for npm module
(if you you ignore node_modules syntax highlighting seem to be off)
//////////
need to validate suman.conf.js when we read it in
AssertionError: => Suman usage error => "testSrcDir" and "testTargetDir" must be at the same level in your project =>
but in this cased testSrcDir is not defined
/////////
restore default $HOME/.suman dir, using suman --restore-default-suman-home-dir
(probably will run create-suman-dir.js)
///////////
"$ which suman" will work
https://www.dropbox.com/s/echzmuzcxjnuorw/Screenshot%202016-11-24%2018.18.47.png?dl=0
///////////
http://stackoverflow.com/questions/27701930/add-user-to-docker-container
/////////
#!/usr/bin/env node -- --inspect
https://github.com/creationix/nvm/issues/1318#event-869975010
///////////
should node --inspect / suman-inspect only be for one file (not --inspecting the runner)?
//////////////////////////////////////
make sure falsy is ok, 0 exit codes passed to t.done() should not fail test.
/////////////////
if sumanOpts.strict => then we fail early if certain files don't exist, like certain suman helpers files
alternatively it could be strict = !lax
///////
http://www.codeproject.com/Questions/1157471/Redirecting-shell-output-via-grep
////////
//TODO: make this path reference the resolved paths in the resolved paths module
const globalHooks = require(path.resolve(global.sumanHelperDirRoot + '/suman.hooks.js'));
//in create-suman-runner =>
const orderPath = path.resolve(global.sumanHelperDirRoot + '/suman.order.js');
//////////
TODO: we need to create shared suman-config loading file so that in index and lib/index it uses same logic
/////////
add suman-debug / suman--debug --paths=["a.js","b.js"]
/////////
forwarding event emitters
https://stackoverflow.com/questions/40856154/forwarding-events-from-one-event-emitter-to-another
////////
update visit *** (every sequence of *** is a future hyperlink that needs filling in)
///////
TODO:
run tests
debug tests
run tests with test coverage
watch project and run/transpile tests on changes
///////
https://nodejs.org/api/tty.html
http://stackoverflow.com/questions/24582183/how-to-stream-to-from-a-file-descriptor-in-node
https://github.com/nodejs/help/issues/365#issuecomment-260574249
https://github.com/nodejs/help/issues/366#issuecomment-260749863
https://github.com/nodejs/help/issues/363#issuecomment-260245021
https://github.com/nodejs/help/issues/363#issuecomment-260213843
////////
TODO: passing rate => 1 stubbed, 5 passed, 6 total, passing rate is 83.33%?
//////////////
TODO: integrate suman once with gulp programmatically
///////////
https://github.com/gulpjs/gulp/issues/770#issuecomment-259282294
////////////
/**
* Copyright (c) 2015-present, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory.
*/
var execSync = require('child_process').execSync;
var opn = require('opn');
function openBrowser(url) {
if (process.platform === 'darwin') {
try {
// Try our best to reuse existing tab
// on OS X Google Chrome with AppleScript
execSync('ps cax | grep "Google Chrome"');
execSync(
'osascript chrome.applescript ' + url,
{cwd: __dirname, stdio: 'ignore'}
);
return true;
} catch (err) {
// Ignore errors.
}
}
// Fallback to opn
// (It will always open new tab)
try {
opn(url);
return true;
} catch (err) {
return false;
}
}
module.exports = openBrowser;
///////////////////
no_silent option needs to be replaced with (pipe, ignore, inherit, etc)
///////////
//TODO: parse (subset of?) command line opts for plain node Suman run?
///////////
TODO: runner should show which order files are read, and then if --rand is chosen, the random order in which
they will run
/////////////////
TODO: do better checks to make sure TDD/BDD interface and give user better warnings if using before instead of setup etc
TODO: /Users/Olegzandr/WebstormProjects/oresoftware/suman/test/testsrc/es5-es6/build-recursion-tests/tes-t7-start.test.js
//////////
TODO: provide expected exit-code in test file, so that when runner sees exit code, it is OK with it and says
56 (expected)
////////////
TODO: double check to see if bail option is always sumanOpts and also make it work with suman.conf.js too
///////
//TODO: runner lock would allow only one instance of the runner to run at a time, perhaps putting requests in a queue
//TODO: suman --clear-runner-queue would delete all lines in the file that queued runner runs
//TODO: add runner-lock to roadmap
//TODO: runnerLock: false should be default in suman.conf.js
///////
//TODO: allow printing of just one line of results, until a failure
//readline.clearLine(process.stdout, 0);
//process.stdout.write('\r' + chalk.green('Pass count: ' + successCount));
/////////
=> Users should be able to provide expected exit codes in another place besides in suman.init()
//////////
TODO: allow for istanbul test coverage in runner child processes
//////////
TODO: regexes seem to match against test-target instead of test-src etc?
///////////
add "append-match-none"
/////////////
suman recommends usage of nvm, so that your global modules actually get installed into your user directory
////////////
TODO: when transpile: true, and test-target is not inside test directory, *and* sumanhelpersdir is inside test directory,
then we need to point sumanHelpersDir to the target directory. Basically, whenever sumanHelpersDir is inside the directory
that will get transpiled/moved, we have to update location.
/////////////
--errors-only should be readline/clearLine so pass count simply goes up
////////////
image:
testgroup
testfile
testsuite
testblock
//////////
TODO: use pragmatik in the lib/index.js file so that we can work with opts.skip properly
//////////
For SUMAN_SINGLE_PROCESS => need to run once.pre before everything and once.post after everything
////////////
change Suites skipped : 1, to Suites skipped (at least 1)
////////////
TODO: SUMAN_SINGLE_PROCESS => for runner, have it either pass data back to runner table, or don't print table at all,
probably latter is better.
////////////////
suman --touch // will touch package.json, which should fire chokidar change events
///////////
assert that typeof second arg is 'object' suman.init(module,{})
/////////
suman --diagnostics
1. check to see if testSrcDir and testTargetDir have the same directory depth, if not, that's a problem
2. ?
////////
need to consolidate multiple Test.describes into one report to send back to runner
////////////
when running with {transpile:true} in suman.conf.js, simply "$ suman" (without -r)
will still transpile *all* of test-src to test-target, (but still only run one file)
////////////
make sure that .babelrc does not get overwritten when using suman --use-babel
/////////////
should always use .babelrc-suman
/////////////
=> beep when a watch-project test fails => https://www.npmjs.com/browse/keyword/beep
////////
need to add SIGINT handler to runner (there is one in lib/index);
this should allow us to run shutdown hooks in any event, and then exit.
if they use two SIGINTs, then shutdown immediately.
///////////
error should be thrown for any key/values passed to suman.init(module,{
x: 'y'
})
throw new Error('"x" is not an available option, available options are: a b c, etc');
/////////////////
create functionality for timeout option in suman.init(module)
/////////////
create setTimeout and call n.kill if child_process does not exit after X number of seconds
////////////
use NODE_PATH
////////////
SUMAN_SINGLE_PROCESS=yes suman //hangs when run in the poolio project
[hook-params.test.js] seems to be the culprit
/////////////
TODO: if transpile:true, and the user points suman to test-target/xyz, then we should just run the tests, not transpile first
/////////////////
suman.hook.js => suman.shared-hooks.js
///////////////
inject data into suman.once.pre.js, because there is data being injected into suman.once.post.js
///////////////
if uncaughtException is thrown/called, add a global flag, which will be checked by all hooks/test cases
if the --ignore-uncaught-exceptions flag is not set then exit early from hooks/test cases
////////////////
all for a boolean t.failed = true;
that way test code can continue and you can print out results/http responses anyway
///////////////
// matches
1. run as test matches
2. convert as suman test matches
3. transpile matches, vs "copy only" matches
global.breakpoint = function() {
if ($config.diagnostics.enable_breakpoints) {
/*jshint -W087 */
debugger;
}
};
////////////////////
pass root path to suman helpers
////////////////////
// when running "$ gulp x" in the wrong directory
[12:47:13] Local gulp not found in ~/WebstormProjects/moover
[12:47:13] Try running: npm install gulp
//////////
sqlite = https://www.youtube.com/watch?v=P3C0iO1yqhk
////////////
suman --init: if suman is already installed locally, and version is not too old, don't reinstall
///////
https://github.com/avajs/ava/pull/402
//////////////////////
On linux you can use taskset to run node with a given CPU affinity.
See this post for information on using the start command in Windows to do the same.
http://stackoverflow.com/questions/10829974/taskset-equivalent-in-windows
http://superuser.com/questions/149312/how-to-set-processor-affinity-on-os-x
//////////////////////////////
3 diagrams, 1 for node a.test.js, 1 for suman a.test.js, 1 for suman --runner a.test.js
draw a node green arrow through a test script
///////////////////
the runner fails to finish for poolio and for burro, not sure why, perhaps add a timeout for each test
SUMAN_DEBUG=yes suman /Users/Olegzandr/WebstormProjects/burro/test-suman/integration_test.js
//////////////////////////
//TODO: http://nathanleclaire.com/blog/2014/07/12/10-docker-tips-and-tricks-that-will-make-you-sing-a-whale-song-of-joy/
//TODO: http://stackoverflow.com/questions/8173232/make-exe-files-from-node-js-app
//TODO: create binary of suman project for speed?
//TODO: assert that rootDir is the same as cd'ing two directories higher than suman/index.js
//TODO: "$ suman --stop-watching"
//TODO: write test for installing suman, using containers to spin up some virtual filesystem?
//TODO: "$ suman --convert" with the "--omit-comments"