Skip to content

Commit 752b1fc

Browse files
committed
Refactoring typescript client
* Moved response handlers into the DefaultRESTClient.ts * Made both response handlers dynamically handle json bodies (Always parses bodies specified as json) * Imported the correct Response type (was implicitly using the one present in the dom typescript domain) * Added a test to prove that the new response handling works properly (Login with a user that doesn't exist) (See #8) * Swapped the order of the tests to use nodejs tests first (so that they are more obvious but also because they are WAY easier to debug) * Upgraded the deps (attempting to make intellij cooperate with the tests but also they are just dev time dependencies so I don't expect any ripples)
1 parent ae2f8d5 commit 752b1fc

6 files changed

+416
-422
lines changed

karma.conf.js

+6-12
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ module.exports = function(config) {
3131

3232
// list of files / patterns to load in the browser (hosted files)
3333
files: [
34-
'dist/fusionauth-typescript-client-test.js'
34+
'dist/fusionauth-typescript-client-test.min.js'
3535
],
3636

3737
// list of files to exclude
@@ -42,13 +42,12 @@ module.exports = function(config) {
4242
preprocessors: {},
4343

4444
plugins: [
45-
mocha,
46-
chai,
47-
mochaReporter,
48-
chrome,
45+
mocha,
46+
chai,
47+
mochaReporter,
48+
chrome,
4949
],
5050

51-
5251
// test results reporter to use
5352
// possible values: 'dots', 'progress'
5453
// available reporters: https://npmjs.org/browse/keyword/karma-reporter
@@ -57,24 +56,19 @@ module.exports = function(config) {
5756
// web server port
5857
port: 9876,
5958

60-
6159
// enable / disable colors in the output (reporters and logs)
6260
colors: true,
6361

64-
6562
// level of logging
6663
// possible values: config.LOG_DISABLE || config.LOG_ERROR || config.LOG_WARN || config.LOG_INFO || config.LOG_DEBUG
6764
logLevel: config.LOG_INFO,
6865

69-
7066
// enable / disable watching file and executing tests whenever any file changes
7167
autoWatch: false,
7268

73-
7469
// start these browsers
7570
// available browser launchers: https://npmjs.org/browse/keyword/karma-launcher
76-
browsers: ['Chrome'],
77-
71+
browsers: ['ChromiumHeadless'],
7872

7973
// Continuous Integration mode
8074
// if true, Karma captures browsers, runs the tests and exits

0 commit comments

Comments
 (0)