Commit Graph
22 Commits
Author SHA1 Message Date
Alexey Sachkov 4e0ab4b393 Adjust paths to config files 2022-01-28 21:40:40 +03:00
Alexey Sachkov 588bcebc87 [NFC] Outline config creation into a separate module
This is done in order to have config creation rules
unified in one place to avoid modifying them multiple times
if they change.

We already had 3 duplicated pieces of code initializing the
config and there will be more config uses in future tests.

This resolves #1960
2022-01-23 20:06:52 +03:00
Alexey Sachkov 4fd085b684 Update package-lock.json 2022-01-23 20:00:16 +03:00
Alexey Sachkov d2250cdabb Merge remote-tracking branch 'origin/master' into private/asachkov/testing-with-supertest 2022-01-23 19:58:56 +03:00
Alexey Sachkov 543d65f43f Add very first HTTP tests
Added tests for "static" pages like Home, Changelog, FAQ, etc.
2022-01-22 00:36:54 +03:00
Alexey Sachkov fc1af353f3 Install and configure required packages for HTTP testing
Two new dev dependencies were added:
- supertest package to perform HTTP testing
- @babel/plugin-transform-runtime

Configured jest to so it is able load files from server directory
2022-01-22 00:36:10 +03:00
Alexey Sachkov 9c57450330 [NFC] Explicitly define variables before using them
Fixed two errors which were discovered by trying to run the code in "strict" mode,
which is automatically done by Jest testing framework.
2022-01-22 00:18:13 +03:00
Alexey Sachkov 0dfe18cd18 Fix liner errors 2022-01-11 23:24:50 +03:00
Alexey Sachkov 8895b44be9 [NFC] Outline an express app into a separate module
This is done in order to be able to re-use that app in API unit tests later
2022-01-11 22:24:23 +03:00
Alexey Sachkov e84cd4fe8b Apply review comments
Switched from raw promises to async/await.
Outlined error handling function to reduce amount of nested code.
Added comment about the new file intent.
2022-01-10 19:25:36 +03:00
Alexey Sachkov 2d85638d7d Update package-lock.json after merge 2022-01-10 18:56:23 +03:00
Alexey Sachkov 1daa700a1a Merge remote-tracking branch 'origin/master' into private/asachkov/v3-markdown-tests 2022-01-10 18:54:53 +03:00
Alexey Sachkov 28793e06fc Fix linter errors 2021-12-30 23:40:58 +03:00
Alexey Sachkov ba74b5aa13 Update package-lock.json 2021-12-30 23:24:38 +03:00
Alexey Sachkov 01bceca7df Add some tests for mustache span syntax
Also refactored test files a bit
2021-12-30 23:23:44 +03:00
Alexey Sachkov ccca313a15 Initial commit with jest enabling
Removed dependency on pico-check and existing tests.
Added jest as dev dependency, introduced minimal configuration for it.
Added a very first couple of tests for our markdown parser/renderer.
2021-12-30 22:41:01 +03:00
Alexey Sachkov 78d4487c58 Fix linter errors 2021-12-29 21:30:03 +03:00
Alexey Sachkov 8a3f52b704 [NFC] Add display name for custom React components
This improves readability of "Components" tab from React Development Tools extension for Chrome
2021-12-29 21:18:54 +03:00
Alexey Sachkov 6e04535eff [NFC] Outline database connection into a separate file 2021-12-29 19:04:17 +03:00
Alexey Sachkov 7057422077 Enable caching of static assets (#1217)
* Enable caching of static assets

* Remove dependency on mime package

Since we only care about two file extensions at the moment,
there is no need to grab the whole package just to avoid
calling 'endsWith' twice.
2021-02-19 17:58:02 -05:00
Alexey Sachkov 2f27aeb77f Update README (#1181)
Added circleci build badge.
Added contribution section.
Refactored the source to fit (mostly) into
80-column limit so it can be nicely read in
terminal applications
2021-01-09 01:24:03 -05:00
Alexey Sachkov 19ca1db674 Tweak spelling of username on user page (#1175)
Fixes #575
2020-12-31 14:12:16 -05:00