code-server-2/test/test-plugin
Anmol Sethi 197a09f0c1
plugin: Test endpoints via supertest
Unfortunately we can't use node-mocks-http to test a express.Router
that has async routes. See https://github.com/howardabrams/node-mocks-http/issues/225

router will just return undefined if the executing handler is async and
so the test will have no way to wait for it to complete. Thus, we have
to use supertest which starts an actual HTTP server in the background
and uses a HTTP client to send requests.
2020-11-06 10:13:01 -05:00
..
public plugin: Add basic loading test 2020-11-06 10:12:46 -05:00
src plugin: Test endpoints via supertest 2020-11-06 10:13:01 -05:00
.gitignore plugin: Add basic loading test 2020-11-06 10:12:46 -05:00
Makefile plugin.ts: Make application endpoint paths absolute 2020-11-06 10:12:46 -05:00
package.json plugin.ts: Adjust to implement pluginapi.d.ts correctly 2020-11-06 10:12:46 -05:00
tsconfig.json Fix CI 2020-11-06 10:12:46 -05:00
yarn.lock plugin: Add basic loading test 2020-11-06 10:12:46 -05:00