Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Solidify-Frontend
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Solidify
Solidify-Frontend
Merge requests
!37
feat: [AOU-1891] migrate TSLint to ESLint
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
feat: [AOU-1891] migrate TSLint to ESLint
fpo/1891_migrate_tslint_to_eslint
into
master
Overview
0
Commits
1
Pipelines
0
Changes
105
Merged
Florent Poittevin
requested to merge
fpo/1891_migrate_tslint_to_eslint
into
master
3 years ago
Overview
0
Commits
1
Pipelines
0
Changes
105
Expand
https://issues.unige.ch/browse/DLCM-1891
Can be test with DLCM
!37 (merged)
Edited
3 years ago
by
Florent Poittevin
0
0
Merge request reports
Compare
master
version 6
61a1c78d
3 years ago
version 5
05f44d7d
3 years ago
version 4
9dbb57cf
3 years ago
version 3
9dbb57cf
3 years ago
version 2
9dbb57cf
3 years ago
version 1
9dbb57cf
3 years ago
master (base)
and
latest version
latest version
e93dcc8c
1 commit,
3 years ago
version 6
61a1c78d
1 commit,
3 years ago
version 5
05f44d7d
1 commit,
3 years ago
version 4
9dbb57cf
1 commit,
3 years ago
version 3
9dbb57cf
1 commit,
3 years ago
version 2
9dbb57cf
1 commit,
3 years ago
version 1
9dbb57cf
1 commit,
3 years ago
105 files
+
621
−
784
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
Files
105
Search (e.g. *.vue) (Ctrl+P)
projects/solidify-frontend/schematics/store-composition/index_spec.ts
+
68
−
62
Options
import
{
SchematicTestRunner
,
UnitTestTree
}
from
"
@angular-devkit/schematics/testing
"
;
import
{
Schema
as
ApplicationOptions
,
Style
}
from
"
@schematics/angular/application/schema
"
;
import
{
SchematicTestRunner
,
UnitTestTree
,
}
from
"
@angular-devkit/schematics/testing
"
;
import
{
Schema
as
ApplicationOptions
,
Style
,
}
from
"
@schematics/angular/application/schema
"
;
import
{
Schema
as
WorkspaceOptions
}
from
"
@schematics/angular/workspace/schema
"
;
import
{
Schema
as
ModelOptions
}
from
"
./schema
"
;
import
*
as
path
from
"
path
"
;
import
*
as
assert
from
"
assert
"
;
import
*
as
path
from
"
path
"
;
import
{
Schema
as
ModelOptions
}
from
"
./schema
"
;
const
workspaceOptions
:
WorkspaceOptions
=
{
name
:
"
workspace
"
,
newProjectRoot
:
"
projects
"
,
version
:
"
6.0.0
"
name
:
"
workspace
"
,
newProjectRoot
:
"
projects
"
,
version
:
"
6.0.0
"
,
};
const
appOptions
:
ApplicationOptions
=
{
name
:
"
bar
"
,
inlineStyle
:
false
,
inlineTemplate
:
false
,
routing
:
false
,
style
:
Style
.
Scss
,
skipTests
:
false
,
skipPackageJson
:
false
name
:
"
bar
"
,
inlineStyle
:
false
,
inlineTemplate
:
false
,
routing
:
false
,
style
:
Style
.
Scss
,
skipTests
:
false
,
skipPackageJson
:
false
,
};
const
defaultOptions
:
ModelOptions
=
{
name
:
"
foo
"
,
// spec: true,
// flat: false,
project
:
"
bar
"
name
:
"
foo
"
,
// spec: true,
// flat: false,
project
:
"
bar
"
,
};
const
collectionPath
=
path
.
join
(
__dirname
,
"
../collection.json
"
);
@@ -34,54 +40,54 @@ const runner = new SchematicTestRunner("schematics", collectionPath);
let
appTree
:
UnitTestTree
;
describe
(
"
Schematic: Store Composition
"
,
()
=>
{
const
schematicRunner
=
new
SchematicTestRunner
(
"
@schematics/solidify
"
,
require
.
resolve
(
"
../collection.json
"
),
);
const
schematicRunner
=
new
SchematicTestRunner
(
"
@schematics/solidify
"
,
require
.
resolve
(
"
../collection.json
"
),
);
beforeEach
(
async
()
=>
{
appTree
=
await
runner
.
runExternalSchematicAsync
(
"
@schematics/angular
"
,
"
workspace
"
,
workspaceOptions
).
toPromise
();
appTree
=
await
runner
.
runExternalSchematicAsync
(
"
@schematics/angular
"
,
"
application
"
,
appOptions
,
appTree
).
toPromise
();
});
beforeEach
(
async
()
=>
{
appTree
=
await
runner
.
runExternalSchematicAsync
(
"
@schematics/angular
"
,
"
workspace
"
,
workspaceOptions
,
).
toPromise
();
appTree
=
await
runner
.
runExternalSchematicAsync
(
"
@schematics/angular
"
,
"
application
"
,
appOptions
,
appTree
,
).
toPromise
();
});
it
(
"
should create a store derived of composition
"
,
async
()
=>
{
const
options
=
{...
defaultOptions
,
name
:
"
test
"
};
it
(
"
should create a store derived of composition
"
,
async
()
=>
{
const
options
=
{...
defaultOptions
,
name
:
"
test
"
};
const
tree
=
await
runner
.
runSchematicAsync
(
"
store-composition
"
,
options
,
appTree
).
toPromise
();
assert
(
tree
.
files
.
includes
(
"
/projects/bar/src/app/test/test.action.ts
"
));
assert
(
tree
.
files
.
includes
(
"
/projects/bar/src/app/test/test.state.ts
"
));
});
const
tree
=
await
runner
.
runSchematicAsync
(
"
store-composition
"
,
options
,
appTree
).
toPromise
();
assert
(
tree
.
files
.
includes
(
"
/projects/bar/src/app/test/test.action.ts
"
));
assert
(
tree
.
files
.
includes
(
"
/projects/bar/src/app/test/test.state.ts
"
));
});
it
(
"
should handle upper case paths
"
,
async
()
=>
{
const
pathOption
=
"
projects/bar/src/app/SOME/UPPER/DIR
"
;
const
options
=
{...
defaultOptions
,
path
:
pathOption
};
it
(
"
should handle upper case paths
"
,
async
()
=>
{
const
pathOption
=
"
projects/bar/src/app/SOME/UPPER/DIR
"
;
const
options
=
{...
defaultOptions
,
path
:
pathOption
};
const
tree
=
await
schematicRunner
.
runSchematicAsync
(
"
store-composition
"
,
options
,
appTree
)
.
toPromise
();
let
files
=
tree
.
files
;
let
root
=
`/
${
pathOption
}
/foo/foo`
;
expect
(
files
).
toEqual
(
jasmine
.
arrayContaining
([
`
${
root
}
.state.ts`
,
`
${
root
}
.action.ts`
,
]));
const
tree
=
await
schematicRunner
.
runSchematicAsync
(
"
store-composition
"
,
options
,
appTree
)
.
toPromise
();
let
files
=
tree
.
files
;
let
root
=
`/
${
pathOption
}
/foo/foo`
;
expect
(
files
).
toEqual
(
jasmine
.
arrayContaining
([
`
${
root
}
.state.ts`
,
`
${
root
}
.action.ts`
,
]));
const
options2
=
{...
options
,
name
:
"
BAR
"
};
const
tree2
=
await
schematicRunner
.
runSchematicAsync
(
"
store-composition
"
,
options2
,
tree
)
.
toPromise
();
files
=
tree2
.
files
;
root
=
`/
${
pathOption
}
/bar/bar`
;
expect
(
files
).
toEqual
(
jasmine
.
arrayContaining
([
`
${
root
}
.state.ts`
,
`
${
root
}
.action.ts`
,
]));
});
const
options2
=
{...
options
,
name
:
"
BAR
"
};
const
tree2
=
await
schematicRunner
.
runSchematicAsync
(
"
store-composition
"
,
options2
,
tree
)
.
toPromise
();
files
=
tree2
.
files
;
root
=
`/
${
pathOption
}
/bar/bar`
;
expect
(
files
).
toEqual
(
jasmine
.
arrayContaining
([
`
${
root
}
.state.ts`
,
`
${
root
}
.action.ts`
,
]));
});
});
Loading