Anders Kaseorg
7b03d48798
zjsunit: Deglobalize assert.
...
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2020-12-01 07:14:00 -05:00
YashRE42
d9b14b5b74
widgetize: Don't warn for deleted tictactoe widget.
2020-11-09 06:01:39 -05:00
YashRE42
967efc32d2
widgets: Remove tictactoe example widget.
...
Steve asked me to remove this, since the tictactoe game was always
intended as a proof of concept. Now that we have poll and todo
widgets, the sample code for tictactoe has much less value.
We replace the content and type in test_widgets.py to maintain
coverage.
2020-11-03 14:46:39 -08:00
Anders Kaseorg
6ec808b8df
js: Add "use strict" directive to CommonJS files.
...
ES and TypeScript modules are strict by default and don’t need this
directive. ESLint will remind us to add it to new CommonJS files and
remove it from ES and TypeScript modules.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2020-07-31 22:09:46 -07:00
Anders Kaseorg
96dcc0ce6e
js: Use ES6 object literal shorthand syntax.
...
Generated by ESLint.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2020-07-21 12:42:22 -07:00
Anders Kaseorg
9102c5a519
node_tests: Trigger events instead of mocking handler installation.
...
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2020-07-21 12:01:26 -07:00
Anders Kaseorg
f3726db89a
js: Normalize strings to double quotes.
...
Prettier would do this anyway, but it’s separated out for a more
reviewable diff. Generated by ESLint.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2020-07-17 14:31:24 -07:00
Rohitt Vashishtha
c8b0627ffe
zblueslip: Run blueslip.reset after each test.
...
This simplifies the blueslip interface to just declaring expected
errors and calling the code to test.
2020-04-20 08:17:20 -04:00
Steve Howell
e64059de79
node tests: Remove most test_log length assertions.
...
For all the places where we just make zero or one
blueslip call, asserting for length is either
unnecessary or overkill.
2020-04-08 11:37:27 -04:00
Steve Howell
f7b432afec
node tests: Auto-include zblueslip for node tests.
...
We already use blueslip stubs in ~45 tests, so we
may as well just auto-include it.
2020-04-03 12:56:49 -04:00
Steve Howell
df84c52a7f
zblueslip: Change API to expect/reset.
...
The `set_test_data` never made complete sense to
me, since it wasn't really data that we were
setting.
2020-04-03 12:56:49 -04:00
Steve Howell
2788ebdde7
minor: Clean up blank lines in tests.
2020-04-03 12:56:49 -04:00
Anders Kaseorg
1087fbebfe
js: Convert _.clone(a) to { ...a } or a.slice().
...
Signed-off-by: Anders Kaseorg <anders@zulipchat.com>
2020-02-25 14:26:06 -08:00
Anders Kaseorg
52a8449a0e
widgetize: Convert widget_contents from object to Map.
...
Signed-off-by: Anders Kaseorg <anders@zulipchat.com>
2020-02-06 17:24:43 -08:00
Rohitt Vashishtha
c176891c2e
poll-widget: Refactor comment to option.
...
We had initially designed the poll widget like a blog
post with comments beneath it but it makes more sense
to think of it as just a simple poll with options.
2019-01-29 09:34:14 -08:00
Tim Abbott
7485cb2a50
widgets: Rename voting_widget to poll_widget.
...
This ensures greater consistency with our other widgets' naming
convention.
2018-12-16 19:46:48 -08:00
Rohitt Vashishtha
71648912ad
zblueslip: Convert node_tests/widgetize.js to zblueslip.
2018-07-10 16:22:52 -04:00
Rhea Parekh
fe4cad15a4
widgets: Add todo widget.
2018-07-10 11:18:05 +05:30
Shubham Dhama
b938523592
widgets: Increase node tests coverage to 100%.
2018-07-03 08:48:49 -04:00