21 Commits

Author SHA1 Message Date
Kristjan ESPERANTO
7098f1e41f
Enable and apply ESLint Jest rules (#3270)
Jest was in the plugin array of the ESLint configuration, but no rules
were enabled. So ESLint hasn't checked any Jest rules yet.

So I activated the recommended Jest rules and added a few more. Then I
fixed the issues (mostly automatically). I have deactivated the rules
"jest/expect-expect" and "jest/no-done-callback" for the time being, as
they would have entailed major changes. I didn't want to make the PR too
big.

I'm not a Jest expert, but the changes so far look good to me. What do
you think of that @khassel? 🙂
2023-11-20 20:11:41 +01:00
Karsten Hassel
f04d578704
improve tests (#2923)
use es6 syntax in all tests, split weather tests, remove callbacks
2022-10-04 10:15:24 +02:00
Karsten Hassel
2b147bb98b do logger mocking in logger.js, remove sandbox stuff from unit tests 2021-09-09 20:50:35 +02:00
rejas
53720ae8ae Fix some eslint issues in the tests 2021-07-14 10:41:29 +02:00
karsten13
ebb5dee1fc run prettier 2021-06-17 23:19:57 +02:00
Karsten Hassel
d9edaffd9c reset changes on js/logger.js, mock logger.js in global_vars tests, workaround for failing dev_console test 2021-06-17 22:50:26 +02:00
Karsten Hassel
2af4009a93 change missing translations log, disable console.log in unit tests 2021-06-12 22:26:02 +02:00
Karsten Hassel
a5f7c946cc jest setup changes, increase setMaxListeners, disable console.log in tests/unit/global_vars 2021-06-12 21:26:08 +02:00
karsten13
1a244726aa run prettier 2021-06-11 22:24:21 +02:00
Karsten Hassel
044935a164 add jest options 2021-06-11 22:18:05 +02:00
Karsten Hassel
16bbb42b8d remove chai from unit tests 2021-06-08 00:47:15 +02:00
Karsten Hassel
66759a33fa unit tests 2021-06-07 00:16:53 +02:00
rejas
d736dd92be Use es6 notation in tests 2021-04-18 14:51:28 +02:00
Veeck
85c32ef843 Use const in test requires 2020-07-09 20:30:43 +02:00
Veeck
abb5dc5739 Run prettier over ALL files once
No other changes done in this commit
2020-05-11 22:22:32 +02:00
Veeck
c8a0f1d0de Fix some more undefs that popped up out of nowhere 2020-05-05 14:54:49 +02:00
rejas
702b98f510 Cleanup imports 2019-06-04 10:43:06 +02:00
Rodrigo Ramírez Norambuena
636dbe5b95 Globing pattern test grunt (#1)
* Fix Matching patterns tests directories Grunt task of eslint

* Fix eslint errors in testsuite.

* Format one line per file in src section in Gruntfile.js
2017-04-03 16:47:22 +02:00
Rodrigo Ramírez Norambuena
f57ad57e62 unit test global.version 2017-02-07 19:35:51 -03:00
Chris van Marle
cd8bee1371 Run App in vm 2017-02-02 10:32:35 +01:00
Sergey Morozov
86fdd91597 Restructured Test Suite
- separated tests into e2e and unit directories
- created configs directory structure to support test framework
- added/modified `npm run test`, `npm run test:unit` and `npm run test:e2e` to target all, unit and e2e tests respectively
- modified some of the test names to be more descriptive

New structure of the Test Suite has following directory tree:

```
tests
├── configs
│   ├── env.js
│   └── modules
│       ├── clock
│       │   ├── clock_12hr.js
│       │   ├── clock_24hr.js
│       │   └── clock_showPeriodUpper.js
│       └── helloworld
│           └── helloworld.js
├── e2e
│   ├── env_spec.js
│   └── modules
│       ├── clock_spec.js
│       └── helloworld_spec.js
└── unit
    ├── functions
    │   └── cmp_versions_spec.js
    └── global_vars
        └── root_path_spec.js
```
2017-01-31 11:08:53 -08:00