Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
coopwire-hypothesis
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
孙灵跃 Leon Sun
coopwire-hypothesis
Commits
ffe2da0a
Commit
ffe2da0a
authored
Jul 11, 2017
by
Robert Knight
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use arrow functions consistently.
For code in newly created JS files, arrow functions should be favored.
parent
4c6deb6a
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
7 deletions
+7
-7
search-filter-test.js
src/sidebar/test/search-filter-test.js
+7
-7
No files found.
src/sidebar/test/search-filter-test.js
View file @
ffe2da0a
...
...
@@ -2,15 +2,15 @@
var
searchFilter
=
require
(
'../search-filter'
)();
describe
(
'sidebar.search-filter'
,
function
()
{
describe
(
'#toObject'
,
function
()
{
it
(
'puts a simple search string under the any filter'
,
function
()
{
describe
(
'sidebar.search-filter'
,
()
=>
{
describe
(
'#toObject'
,
()
=>
{
it
(
'puts a simple search string under the any filter'
,
()
=>
{
var
query
=
'foo'
;
var
result
=
searchFilter
.
toObject
(
query
);
assert
.
equal
(
result
.
any
[
0
],
query
);
});
it
(
'uses the filters as keys in the result object'
,
function
()
{
it
(
'uses the filters as keys in the result object'
,
()
=>
{
var
query
=
'user:john text:foo quote:bar group:agroup other'
;
var
result
=
searchFilter
.
toObject
(
query
);
...
...
@@ -21,7 +21,7 @@ describe('sidebar.search-filter', function() {
assert
.
equal
(
result
.
group
[
0
],
'agroup'
);
});
it
(
'collects the same filters into a list'
,
function
()
{
it
(
'collects the same filters into a list'
,
()
=>
{
var
query
=
'user:john text:foo quote:bar other user:doe text:fuu text:fii'
;
var
result
=
searchFilter
.
toObject
(
query
);
...
...
@@ -34,13 +34,13 @@ describe('sidebar.search-filter', function() {
assert
.
equal
(
result
.
quote
[
0
],
'bar'
);
});
it
(
'preserves data with semicolon characters'
,
function
()
{
it
(
'preserves data with semicolon characters'
,
()
=>
{
var
query
=
'uri:http://test.uri'
;
var
result
=
searchFilter
.
toObject
(
query
);
assert
.
equal
(
result
.
uri
[
0
],
'http://test.uri'
);
});
it
(
'collects valid filters and puts invalid into the "any" category'
,
function
()
{
it
(
'collects valid filters and puts invalid into the "any" category'
,
()
=>
{
var
query
=
'uri:test foo:bar text:hey john:doe quote:according hi-fi a:bc'
;
var
result
=
searchFilter
.
toObject
(
query
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment