28 Commits

Author SHA1 Message Date
Michael Rawlings
ad6ebaabe6 improve vdom render tests and migratable deprecation messages (#1364) 2019-06-24 14:28:58 -07:00
Michael Rawlings
4a73060bc6 Cleanup tests (#1341)
Cleanup tests and add assertions that all deprecated tests log warnings, and all non deprecated tests don't.
2019-05-28 10:54:31 -07:00
Michael Rawlings
9a916d856c
Env var helpers (#1191)
* add MARKO_NO_MIGRATE env var to skip migration stage

* add EXPECT_DEPRECATED_FAILURES env var to expect all fixtures in a deprecated directory to fail

* add COMPLAIN_THROWS env var to cause deprecation warnings to be errors
2018-12-12 10:53:27 -08:00
Michael Rawlings
92c448f639 Autotest refactor (#1023)
* update autotest api and first few test suites

* refactor components-browser to use the new autotest api

* minor changes to update adjustIndent and components-pages to new autotest api

* refactor and combine async-render, deprecated-async-fragments, and render suites

* migrate compiler tests to new autotest runner

* migrate components-compilation tests to use new autotest api

* migrate most remaining test runners to new autotest api

* update adjustIndent

* migrate express tests to new autotest api

* switch from compare to snapshot

* move versions into directory

* remove snapshot sequences, prefix to name, suffix to ext

* refactor autotest

* keep node 4 happy: don't use destructured parameters

* use strict

* update contributing document to reflect new autotest api

* better snapshot errors with clickable path

* remove old vdomSkip property, fix some normalization in the render test runner, skip only tests that need to be skipped

* for generated vdom expectations use expected.html instead of rerendering the html template, update expected files that had editor added newlines at the end

* remove half-finished test that was intended to replace another test (render/fixtures/preserveWhitespace-load-option) - we'll keep the original
2018-03-23 11:27:52 -07:00
Michael Rawlings
0f5e639775 Format + lint (#1016)
* add prettierignore

* switch to eslint:recommended + eslint-config-prettier

* fix eslint violations

* remove more .jshintrc files

* better conditional structure

* add prettier and update prettier ignore

* add precommit hook to run prettier

* add lint check to precommit and format check to ci

* format all the things

* add generated files

* let npm do it's thing with package.json
2018-03-09 10:02:11 -08:00
Michael Rawlings
64da7034d9
Test allow failures (#1014)
* update mocha, add it-fails, add failing tests and skip reasons to autotest, use in the existing tests

* update labels and testing info in CONTRIBUTING
2018-03-05 21:48:08 -08:00
Michael Rawlings
bd4855271d Hydrate fixes (#1010)
* enable legacy hydrate tests, update test harness to support legacy widgets

* enable autokey for tests, update expectations, add better html diff output

* update test harness to register statically discovered components

* return to using a single mount function for legacy and modern components

* remove lasso from test package dependencies

* add all renders to the renderedCache, track instances separately

* temporarily skip failing hydrate test for widget types

* update widget lifecycle tracker to work with hydrate test as well

* update tests/expectations to use serialize globals: onCreate should be called when hydrating stateful components

* preserve included renderbodies

* update legacy renderbodies to use the new method of preservations

* mount components in preserved renderbodies

* stateful components should rerender when mounting, not all legacy components are split components

* ensure elements with events in split components have thier keys serialized

* call onCreate and onInput when mounting root rerender components

* fix code supporting once-* causing all events (on-* included) for hydrated split components to be handled only once

* change the way input is removed from legacy components
2018-03-02 16:09:14 -08:00
Michael Rawlings
ddca804915 Hydrate tests (#994)
* enable hydrate tests, use repeated key in split component to get references to server-rendered components

* allow tests to determine if hydrate mode, update attach event tests for correct expectations when hydrating

* add empty class so that the component is mounted when hydrating and we have a component reference to use for testing

* add support for  to the hydrate tests, update tests to serializeGlobals

* allow skipping hydrate only, skip hydrate for implicit component tests

* skip hydrate for test with two different global inputs

* better support for split/legacy components in the test harness

* components are already mounted in hydrate mode, so setup needs to be done elsewhere

* temporarily skip tests failing due to onCreate not being called for root level hydrated components

* only add attach/detach global helpers if target is vdom - this should not run on the server and was causing the morphdom/vdom tests to fail if it was included before them

* skip hydrate tests for deprecated components - there are a number of issues here that still need to be fixed
2018-02-23 12:15:44 -08:00
Scott Davis
f76bfff323 Add once-[event] directive Fixes #985 (#990)
* Add `once-[event]` directive.
* Improve docs for attaching events.
2018-02-20 10:33:43 -08:00
Dylan Piercey
a7f529debd Testing Improvements. (#989)
* * Setup utility to run jsdom tests in the same process without bundling.
* Cleanup require hooks in test suite.
* Test organization and cleanup.
* Remove redundant autotest utilities.

* Switch to require for browser.json loading

* Cache browser.json remaps. Fix components-browser rehydration setup

* Improve inline docs, remove some unneeded init code for testing modules.

* Remove unneeded promise polyfill
2018-02-20 10:26:48 -08:00
Dylan Piercey
d00ea44d46 Test perf and organization (#981)
* Switch to in memory lasso builds and other optimizations.

* Condense components-compilation tests.

* Update lasso-fs-writer

* Condense components-compilation and compiler tests

* Increase mocha test timeout

* Allow lasso to be gc'd for tests

* Improve test cache clearing

* Fix lasso memory leak in tests

* Cache instanbul intrumenting.

* Hide complain logs.
2018-02-06 18:53:55 -08:00
Michael Rawlings
cd487f2013 fix tests files that did not run independently 2017-11-30 19:30:53 -08:00
Patrick Steele-Idem
2b2ff0b7ca Fixes #854 - Make every .marko file a UI component 2017-09-22 12:12:42 -06:00
Michael Rawlings
5a977077cb enable meta by default on server 2017-02-09 14:34:55 -08:00
Michael Rawlings
6531f7a5ea update compileForBrowser/compileFileForBrowser to return an object (the compiled template instance) instead of just the source code. Add a dependencies property to the object. 2017-01-07 09:45:01 -08:00
Ethan Marmaduke
aacab561eb Normalize the expected and actual strings during autotests 2016-11-23 13:00:09 -05:00
Michael Rawlings
c35bbf0b9d updated to use nyc and istanbul 1.0, added coverage for browser tests and merged with server coverage for a more accurate number 2016-11-14 18:35:52 -08:00
Patrick Steele-Idem
32bacb7002 Merge of marko-vdom completed 2016-11-02 20:23:42 -06:00
Patrick Steele-Idem
ee815fc49b Runtime now supports both vdom and html output
All tests are passing
2016-10-11 17:28:09 -06:00
Patrick Steele-Idem
5df81440e5 Reorganized tests 2016-05-05 07:56:24 -07:00
Patrick Steele-Idem
18438172ff Updated test runner to allow comma separated list of tests to run 2016-04-06 16:21:47 -06:00
Patrick Steele-Idem
70716e2209 Fixes #176 - Marko v3: Migrate async taglib 2016-02-11 15:00:58 -07:00
Patrick Steele-Idem
1bf6838c2c Lot's of improvements
All string expressions are now parsed using esprima when using the builder API
2015-12-23 16:47:42 -07:00
Patrick Steele-Idem
4b38989892 Restored range looping functionality 2015-12-07 13:21:02 -07:00
Patrick Steele-Idem
a9fd496589 More cleanup. Made all failing tests pending 2015-12-03 16:29:12 -07:00
Patrick Steele-Idem
6ecb5b32dd Record error for invalid attributes 2015-12-02 23:01:23 -07:00
Patrick Steele-Idem
66f9be0d4e Reintroduced attrs support 2015-12-01 09:36:44 -07:00
Patrick Steele-Idem
069b3e5ba9 Initial commit for marko v3 with htmljs-parser
Work-in-progress. Lots of failing tests.
2015-11-24 14:30:32 -07:00