Skip to content

Commit b10a87c

Browse files
committed
Test refactor
1 parent 9ccf24a commit b10a87c

26 files changed

+991
-1387
lines changed

Gruntfile.js

+6-6
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ module.exports = function (grunt) {
1515
},
1616

1717
sass: {
18-
src: 'src/sass',
18+
src: 'src/styles',
1919
dist: 'dist'
2020
}
2121
},
@@ -89,11 +89,11 @@ module.exports = function (grunt) {
8989
'test/core/build.html',
9090
'test/core/handles.html',
9191
'test/core/functions.html',
92-
'test/core/response.html',
93-
'test/core/categories.html',
94-
'test/core/event.html',
95-
'test/core/template.html',
96-
'test/core/features.html'
92+
// 'test/core/response.html',
93+
// 'test/core/categories.html',
94+
// 'test/core/event.html',
95+
// 'test/core/template.html',
96+
// 'test/core/features.html'
9797
]
9898
},
9999

demo/example_categories.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
<link href="../dist/easy-autocomplete.themes.min.css" rel="stylesheet" type="text/css">
77
<link href='//fonts.googleapis.com/css?family=Roboto:400,300,300italic,400italic,600,600italic&amp;subset=latin,cyrillic-ext,greek-ext,latin-ext,cyrillic'
88
rel='stylesheet' type='text/css'>
9-
<script src="../lib/jquery-1.11.2.min.js"></script>
9+
<script src="../node_modules/jquery/dist/jquery.min.js"></script>
1010
<script src="../dist/jquery.easy-autocomplete.min.js" type="text/javascript"></script>
1111
</head>
1212
<body>

demo/example_custom_template.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<head>
44
<title>EasyAutocomplete custom template example</title>
55
<link href="../dist/easy-autocomplete.min.css" rel="stylesheet" type="text/css">
6-
<script src="../lib/jquery-1.11.2.min.js"></script>
6+
<script src="../node_modules/jquery/dist/jquery.min.js"></script>
77
<script src="../dist/jquery.easy-autocomplete.min.js" type="text/javascript"></script>
88
</head>
99
<body>

demo/example_duckduckgo.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<head>
44
<title>EasyAutocomplete duckduckgo example</title>
55
<link href="../dist/easy-autocomplete.min.css" rel="stylesheet" type="text/css">
6-
<script src="../lib/jquery-1.11.2.min.js"></script>
6+
<script src="../node_modules/jquery/dist/jquery.min.js"></script>
77
<script src="../dist/jquery.easy-autocomplete.min.js" type="text/javascript"></script>
88
</head>
99
<body>

demo/example_email.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<head>
44
<title>EasyAutocomplete email example</title>
55
<link href="../dist/easy-autocomplete.min.css" rel="stylesheet" type="text/css">
6-
<script src="../lib/jquery-1.11.2.min.js"></script>
6+
<script src="../node_modules/jquery/dist/jquery.min.js"></script>
77
<script src="../dist/jquery.easy-autocomplete.min.js" type="text/javascript"></script>
88
</head>
99
<body>

demo/example_flags.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<title>EasyAutocomplete json example</title>
55
<link href="../dist/easy-autocomplete.min.css" rel="stylesheet" type="text/css">
66
<link href="resources/flags.css" rel="stylesheet" type="text/css">
7-
<script src="../lib/jquery-1.11.2.min.js"></script>
7+
<script src="../node_modules/jquery/dist/jquery.min.js"></script>
88
<script src="../dist/jquery.easy-autocomplete.min.js" type="text/javascript"></script>
99
</head>
1010
<body>

demo/example_json.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<head>
44
<title>EasyAutocomplete json example</title>
55
<link href="../dist/easy-autocomplete.min.css" rel="stylesheet" type="text/css">
6-
<script src="../lib/jquery-1.11.2.min.js"></script>
6+
<script src="../node_modules/jquery/dist/jquery.min.js"></script>
77
<script src="../dist/jquery.easy-autocomplete.min.js" type="text/javascript"></script>
88
</head>
99
<body>

demo/example_remote.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<head>
44
<title>EasyAutocomplete remote example</title>
55
<link href="../dist/easy-autocomplete.min.css" rel="stylesheet" type="text/css">
6-
<script src="../lib/jquery-1.11.2.min.js"></script>
6+
<script src="../node_modules/jquery/dist/jquery.min.js"></script>
77
<script src="../dist/jquery.easy-autocomplete.min.js" type="text/javascript"></script>
88
</head>
99
<body>

demo/example_simple.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<head>
44
<title>EasyAutocomplete simple example</title>
55
<link href="../dist/easy-autocomplete.min.css" rel="stylesheet" type="text/css">
6-
<script src="../lib/jquery-1.11.2.min.js"></script>
6+
<script src="../node_modules/jquery/dist/jquery.min.js"></script>
77
<script src="../dist/jquery.easy-autocomplete.min.js" type="text/javascript"></script>
88
</head>
99
<body>

demo/example_static_link.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<head>
44
<title>EasyAutocomplete static links</title>
55
<link href="../dist/easy-autocomplete.min.css" rel="stylesheet" type="text/css">
6-
<script src="../lib/jquery-1.11.2.min.js"></script>
6+
<script src="../node_modules/jquery/dist/jquery.min.js"></script>
77
<script src="../dist/jquery.easy-autocomplete.min.js" type="text/javascript"></script>
88
</head>
99
<body>

demo/example_theme.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
<link href="../dist/easy-autocomplete.themes.min.css" rel="stylesheet" type="text/css">
77
<link href='//fonts.googleapis.com/css?family=Open+Sans:400,300,300italic,400italic,700,700italic&amp;subset=latin,cyrillic-ext,greek-ext,latin-ext,cyrillic'
88
rel='stylesheet' type='text/css'>
9-
<script src="../lib/jquery-1.11.2.min.js"></script>
9+
<script src="../node_modules/jquery/dist/jquery.min.js"></script>
1010
<script src="../dist/jquery.easy-autocomplete.min.js" type="text/javascript"></script>
1111
</head>
1212
<body>

demo/example_theme_funky.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<link href="../dist/easy-autocomplete.min.css" rel="stylesheet" type="text/css">
66
<link href="../dist/easy-autocomplete.themes.min.css" rel="stylesheet" type="text/css">
77
<link href='//fonts.googleapis.com/css?family=Inconsolata' rel='stylesheet' type='text/css'>
8-
<script src="../lib/jquery-1.11.2.min.js"></script>
8+
<script src="../node_modules/jquery/dist/jquery.min.js"></script>
99
<script src="../dist/jquery.easy-autocomplete.min.js" type="text/javascript"></script>
1010
</head>
1111
<body>

demo/example_theme_square.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
<link href="../dist/easy-autocomplete.themes.min.css" rel="stylesheet" type="text/css">
77
<link href='//fonts.googleapis.com/css?family=Roboto:400,300,300italic,400italic,600,600italic&amp;subset=latin,cyrillic-ext,greek-ext,latin-ext,cyrillic'
88
rel='stylesheet' type='text/css'>
9-
<script src="../lib/jquery-1.11.2.min.js"></script>
9+
<script src="../node_modules/jquery/dist/jquery.min.js"></script>
1010
<script src="../dist/jquery.easy-autocomplete.min.js" type="text/javascript"></script>
1111
<style>
1212

demo/example_xml.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<head>
44
<title>EasyAutocomplete xml example</title>
55
<link href="../dist/easy-autocomplete.min.css" rel="stylesheet" type="text/css">
6-
<script src="../lib/jquery-1.11.2.min.js"></script>
6+
<script src="../node_modules/jquery/dist/jquery.min.js"></script>
77
<script src="../dist/jquery.easy-autocomplete.min.js" type="text/javascript"></script>
88
</head>
99
<body>

dist/jquery.easy-autocomplete.js

+2-11
Original file line numberDiff line numberDiff line change
@@ -217,11 +217,7 @@ var EasyAutocomplete = (function (scope) {
217217

218218
options.list.match.method = function (element, phrase) {
219219

220-
if (element.search(phrase) > -1) {
221-
return true;
222-
} else {
223-
return false;
224-
}
220+
return element.search(phrase) > -1;
225221
};
226222

227223
}
@@ -275,7 +271,6 @@ var EasyAutocomplete = (function (scope) {
275271
}
276272
}
277273

278-
279274
function processAfterMerge() {
280275

281276
if (defaults.url !== 'list-required' && typeof defaults.url !== 'function') {
@@ -330,11 +325,7 @@ var EasyAutocomplete = (function (scope) {
330325
}
331326

332327
function isAssigned(name) {
333-
if (defaults[name] !== undefined && defaults[name] !== null) {
334-
return true;
335-
} else {
336-
return false;
337-
}
328+
return defaults[name] !== undefined && defaults[name] !== null;
338329
}
339330
function printPropertiesThatDoesntExist(consol, optionsToCheck) {
340331

dist/maps/easy-autocomplete.css.map

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/maps/easy-autocomplete.min.css.map

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/maps/easy-autocomplete.themes.css.map

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)