@@ -2,82 +2,91 @@ import 'locus'
22import { expect } from 'chai'
33describe ( 'filter tests' , ( ) => {
44
5- it . skip ( 'should return a new array of only even numbers ' , ( ) => {
6- const numbers = [ 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 , 10 ] ;
7-
8- // your code goes here
9-
10- expect ( results ) . to . deep . equal ( [ 2 , 4 , 6 , 8 , 10 ] ) ;
11- } ) ;
12-
13- it . skip ( 'should return a new array of only odd numbers ' , ( ) => {
14- const numbers = [ 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 , 10 ] ;
15-
16- // your code goes here
17-
18- expect ( results ) . to . deep . equal ( [ 1 , 3 , 5 , 7 , 9 ] ) ;
19- } ) ;
20-
21- it . skip ( 'should return a new array of words with three characters' , ( ) => {
22- const words = [ "pill" , "bad" , "finger" , "cat" , "blue" , "dog" , "table" , "red" ] ;
23-
24- // your code goes here
25-
26- expect ( results ) . to . deep . equal ( [ "bad" , "cat" , "dog" , "red" ] ) ;
27- } ) ;
28-
29- it . skip ( 'should return a new array of arrays' , ( ) => {
30- const elements = [ "CAT" , [ "dog" ] , 23 , [ 56 , 3 , 8 ] , "AIMLESS" , 43 , "butter" ] ;
31-
32- // your code goes here
33-
34- expect ( results ) . to . deep . equal ( [ [ "dog" ] , [ 56 , 3 , 8 ] ] ) ;
35- } ) ;
36-
37- it . skip ( 'should a new object with cool song 2 removed' , ( ) => {
38- const human = {
39- name :'yung-jhun' , songs :[ [ 'cool song 1' , 50 ] ,
40- [ 'cool song 2' , 100 ] ,
41- [ 'cool song 3' , 90 ] ]
42- } ;
43-
44- const saying = 'cool song 2' ;
45-
46- //your code goes here
47-
48- expect ( human . songs ) . to . deep . equal ( [ [ 'cool song 1' , 50 ] ,
49- [ 'cool song 3' , 90 ] ] ) ;
50- } ) ;
51-
52- it . skip ( 'should filter message based off of strings from user ' , ( ) => {
53- const userString = 'su' ;
54- const messages = [ { user :'louisa' , message :'haaaaa' } ,
55- { user :'yung-jhun' , message :'kewl dude' } ,
56- { user :'alter-nate' , message :'suh kewl' } ,
57- { user :'meeka' , message :'adfasuhlkj' } ,
58- { user :'robbie' , message :'im loud' } ] ;
59-
60- // your code goes here
61-
62-
63- expect ( results ) . to . deep . equal ( [ { user :'alter-nate' , message :'suh kewl' } ,
64- { user :'meeka' , message :'adfasuhlkj' } ,
65- { user :'robbie' , message :'im loud' } ] ) ;
66- } ) ;
67-
68- it . skip ( 'should return a new array with the correct ids' , ( ) => {
69- const data = [ { account :'person 1' , id :'00112' } ,
70- { account :'person 2' , id :'00045' } ,
71- { account :'person 3' , id :'12309' } ,
72- { account :'person 4' , id :'55931' } ,
73- { account :'person 5' , id :'90215' } ] ;
74-
75- const ids = [ '00112' , '90215' , '12309' ] ;
76-
77- // your code goes here
78-
79- expect ( results ) . to . deep . equal ( [ { account :'person 1' , id :'00112' } ,
80- { account :'person 3' , id :'12309' } ,
81- { account :'person 5' , id :'90215' } ] ) ;
82- } ) ;
83- } ) ;
5+ it . skip ( 'should return a new array of only even numbers ' , ( ) => {
6+ const numbers = [ 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 , 10 ] ;
7+
8+ // your code goes here
9+
10+ expect ( results ) . to . deep . equal ( [ 2 , 4 , 6 , 8 , 10 ] ) ;
11+ } ) ;
12+
13+ it . skip ( 'should return a new array of only odd numbers ' , ( ) => {
14+ const numbers = [ 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 , 10 ] ;
15+
16+ // your code goes here
17+
18+ expect ( results ) . to . deep . equal ( [ 1 , 3 , 5 , 7 , 9 ] ) ;
19+ } ) ;
20+
21+ it . skip ( 'should return a new array of words with three characters' , ( ) => {
22+ const words = [ "pill" , "bad" , "finger" , "cat" , "blue" , "dog" , "table" , "red" ] ;
23+
24+ // your code goes here
25+
26+ expect ( results ) . to . deep . equal ( [ "bad" , "cat" , "dog" , "red" ] ) ;
27+ } ) ;
28+
29+ it . skip ( 'should return a new array of arrays' , ( ) => {
30+ const elements = [ "CAT" , [ "dog" ] , 23 , [ 56 , 3 , 8 ] , "AIMLESS" , 43 , "butter" ] ;
31+
32+ // your code goes here
33+
34+ expect ( results ) . to . deep . equal ( [
35+ [ "dog" ] ,
36+ [ 56 , 3 , 8 ]
37+ ] ) ;
38+ } ) ;
39+
40+ it . skip ( 'should a new object with cool song 2 removed' , ( ) => {
41+ const human = {
42+ name :'yung-jhun' ,
43+ songs :[
44+ [ 'cool song 1' , 50 ] ,
45+ [ 'cool song 2' , 100 ] ,
46+ [ 'cool song 3' , 90 ]
47+ ]
48+ } ;
49+
50+ const saying = 'cool song 2' ;
51+
52+ //your code goes here
53+ expect ( human . songs ) . to . deep . equal ( [
54+ [ 'cool song 1' , 50 ] ,
55+ [ 'cool song 3' , 90 ]
56+ ] ) ;
57+ } ) ;
58+
59+ it . skip ( 'should filter message based off of strings from user ' , ( ) => {
60+ const userString = 'su' ;
61+ const messages = [ { user :'louisa' , message :'haaaaa' } ,
62+ { user :'yung-jhun' , message :'kewl dude' } ,
63+ { user :'alter-nate' , message :'suh kewl' } ,
64+ { user :'meeka' , message :'adfasuhlkj' } ,
65+ { user :'robbie' , message :'im loud' }
66+ ] ;
67+
68+ // your code goes here
69+
70+ expect ( results ) . to . deep . equal ( [ { user :'alter-nate' , message :'suh kewl' } ,
71+ { user :'meeka' , message :'adfasuhlkj' }
72+ ] ) ;
73+ } ) ;
74+
75+ it . skip ( 'should return a new array with the correct ids' , ( ) => {
76+ const data = [ { account :'person 1' , id :'00112' } ,
77+ { account :'person 2' , id :'00045' } ,
78+ { account :'person 3' , id :'12309' } ,
79+ { account :'person 4' , id :'55931' } ,
80+ { account :'person 5' , id :'90215' }
81+ ] ;
82+
83+ const ids = [ '00112' , '90215' , '12309' ] ;
84+
85+ // your code goes here
86+
87+ expect ( results ) . to . deep . equal ( [ { account :'person 1' , id :'00112' } ,
88+ { account :'person 3' , id :'12309' } ,
89+ { account :'person 5' , id :'90215' }
90+ ] ) ;
91+ } ) ;
92+ } ) ;