1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2025-04-11 13:23:17 +00:00
Mario Pietsch 8aa558eb2c
Remove module function wrapper and add matching configurations for dprint and eslint (#7596)
* remove blks first try

* dprint.json seems to be OK, some forgotten functions

* add some more space-after-keyword settings

* server remove blks

* add **/files to dprint exclude

* dprint.js fixes a typo

* add boot.js and bootprefix.js to dprint exclude

* dprint change dprint.json

* add dprint fmt as script

* remove jslint comments

* fix whitespace

* fix whitespace

* remove function-wrapper from geospatial plugin

* fix whitespace

* add function wrapper to dyannotate-startup

* remove dpring.json
2025-03-21 17:22:57 +00:00
..
2019-11-12 21:42:38 +00:00
2022-11-20 17:54:18 +00:00

title: $:/plugins/tiddlywiki/jasmine/readme

This plugin provides a framework for running tests in the browser and under Node.js. It is based on [[Jasmine|https://jasmine.github.io/]] test framework. On Tiddlywiki, it runs tests in all javascript tiddlers tagged with <<tag $:/tags/test-spec>>.

[[Source code|https://github.com/TiddlyWiki/TiddlyWiki5/blob/master/plugins/tiddlywiki/jasmine]]

!! Usage on Node.js

On the command line, type `tiddlywiki --test`.

Alternatively, you can set up a build task for jasmine by including the following in your tiddlywiki.info file:

```
{
	...
	"build": {
		...
		"test": ["--test"]
	}
}
```

You could then run tests by typing `tiddlywiki --build test` or just `tiddlywiki --build`. The advantage to this is it allows you to include other commands to run as well. See `tiddlywiki --help test` for more information.

This will run the tests and produce a test file in your output directory.

```
		"test": [
			"--test",
			"--rendertiddler","$:/core/save/all","test.html","text/plain"]
```

!! Usage on a browser

Once you've constructed a Tiddlywiki file using a command like the one above, you can run the tests simply by opening it. Tests run automatically, and the results will be at the bottom of the window.