Skip to content
This repository was archived by the owner on Jan 4, 2019. It is now read-only.

Commit

Permalink
Greenkeeper/sn client js 2.4.0 (#40)
Browse files Browse the repository at this point in the history
* chore(package): update sn-client-js to version 2.4.0

* [KFI]chore(launch.json): fixed mocha debug profile for vs code

* [KFI]test(EpicsTest): Flatterned Select assertions, added RELOAD_CONTENTFIELDS_REQUEST field list (r
  • Loading branch information
gallayl authored Sep 19, 2017
1 parent f99561a commit 57e5b4e
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 44 deletions.
54 changes: 29 additions & 25 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -1,27 +1,31 @@
{
// Use IntelliSense to learn about possible Node.js debug attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"type": "node",
"request": "launch",
"name": "Debug tests",
"runtimeExecutable": "mocha",
"windows": {
"runtimeExecutable": "mocha.cmd"
"version": "0.2.0",
"configurations": [
{
"type": "node",
"request": "launch",
"name": "Mocha Tests",
"program": "${workspaceRoot}/node_modules/mocha/bin/_mocha",
"args": [
"-u",
"tdd",
"--timeout",
"999999",
"--colors",
"-p",
"${workspaceRoot}\\tsconfig.json",
"${workspaceRoot}/dist/test/index.js"
],
"internalConsoleOptions": "openOnSessionStart"
},
"preLaunchTask": "build",
"runtimeArgs": [
"--debug-brk",
"./dist/test/index.js"
],
"program": "${workspaceRoot}\\test\\index.ts",
"outFiles": [
"${workspaceRoot}\\dist\\**\\*.js"
],
"port": 5858
}
]
}
{
"type": "node",
"request": "launch",
"name": "Launch Program",
"program": "${workspaceRoot}\\dist\\src\\sn-redux.js",
"outFiles": [
"${workspaceRoot}/out/**/*.js"
]
}
]
}
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@
"redux-mock-store": "^1.2.3",
"redux-observable": "^0.16.0",
"semantic-release": "^8.0.0",
"sn-client-js": "^2.3.0",
"sn-client-js": "^2.4.0",
"tslint": "^5.6.0",
"typedoc": "^0.8.0",
"typedoc-md-theme": "^1.0.1",
Expand Down
26 changes: 8 additions & 18 deletions test/EpicsTests.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import { createEpicMiddleware } from 'redux-observable';
import { Mocks, ContentTypes, HttpProviders, Authentication, ODataApi, Content } from 'sn-client-js';
import { Epics } from '../src/Epics'
import { Actions } from '../src/Actions'
import { Store } from '../src/Store'
const expect = Chai.expect;
import 'rxjs';

Expand Down Expand Up @@ -37,10 +38,7 @@ describe('Epics', () => {
path: '/workspaces/Project',
options:
{
select: [
['Id', 'Path', 'Name', 'Type'],
['DisplayName', 'Description', 'Icon']
],
select: [ 'Id', 'Path', 'Name', 'Type', 'DisplayName', 'Description', 'Icon' ],
metadata: 'no',
inlinecount: 'allpages',
expand: undefined,
Expand All @@ -51,10 +49,7 @@ describe('Epics', () => {
type: 'FETCH_CONTENT_FAILURE',
params:
{
select: [
['Id', 'Path', 'Name', 'Type'],
['DisplayName', 'Description', 'Icon']
],
select: ['Id', 'Path', 'Name', 'Type', 'DisplayName', 'Description', 'Icon'],
metadata: 'no',
inlinecount: 'allpages',
expand: undefined,
Expand Down Expand Up @@ -132,10 +127,7 @@ describe('Epics', () => {
path: '/workspaces/Project',
options:
{
select: [
['Id', 'Path', 'Name', 'Type'],
['DisplayName', 'Description', 'Icon']
],
select: ['Id', 'Path', 'Name', 'Type', 'DisplayName', 'Description', 'Icon'],
metadata: 'no',
inlinecount: 'allpages',
expand: undefined,
Expand All @@ -146,10 +138,7 @@ describe('Epics', () => {
type: 'LOAD_CONTENT_FAILURE',
params:
{
select: [
['Id', 'Path', 'Name', 'Type'],
['DisplayName', 'Description', 'Icon']
],
select: ['Id', 'Path', 'Name', 'Type', 'DisplayName', 'Description', 'Icon'],
metadata: 'no',
inlinecount: 'allpages',
expand: undefined,
Expand Down Expand Up @@ -197,12 +186,13 @@ describe('Epics', () => {
});
it('handles the error', () => {
const content = repo.HandleLoadedContent({ DisplayName: 'My Content', Id: 123, Path: '/workspaces' }, ContentTypes.Task)
store.dispatch({ type: 'RELOAD_CONTENTFIELDS_REQUEST', content, options: {} });
store.dispatch({ type: 'RELOAD_CONTENTFIELDS_REQUEST', content, options: {}, fields: ['DisplayName'] });
expect(store.getActions()).to.be.deep.eq(
[{
type: 'RELOAD_CONTENTFIELDS_REQUEST',
content,
options: {}
options: {},
fields: ['DisplayName']
},
{
type: 'RELOAD_CONTENTFIELDS_FAILURE',
Expand Down

0 comments on commit 57e5b4e

Please sign in to comment.