Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit959fe96

Browse files
committed
I corrected what was expected for the result on the testing statement using the user string and messages.
1 parent1d7d42e commit959fe96

File tree

1 file changed

+88
-79
lines changed

1 file changed

+88
-79
lines changed

‎filter/filter-test.js‎

Lines changed: 88 additions & 79 deletions
Original file line numberDiff line numberDiff line change
@@ -2,82 +2,91 @@ import 'locus'
22
import{expect}from'chai'
33
describe('filter tests',()=>{
44

5-
it.skip('should return a new array of only even numbers ',()=>{
6-
constnumbers=[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-
constnumbers=[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-
constwords=["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-
constelements=["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-
consthuman={
39-
name:'yung-jhun',songs:[['cool song 1',50],
40-
['cool song 2',100],
41-
['cool song 3',90]]
42-
};
43-
44-
constsaying='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-
constuserString='su';
54-
constmessages=[{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-
constdata=[{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-
constids=['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+
constnumbers=[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+
constnumbers=[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+
constwords=["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+
constelements=["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+
consthuman={
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+
constsaying='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+
constuserString='su';
61+
constmessages=[{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+
constdata=[{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+
constids=['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+
});

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp