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

Commitfe650cf

Browse files
committed
renamed tests so theyre more descriptive
1 parent62d30c1 commitfe650cf

File tree

1 file changed

+17
-11
lines changed

1 file changed

+17
-11
lines changed

‎filter/filter-test.js‎

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

5-
it.skip('shouldpick the even numbers ',()=>{
5+
it.skip('shouldreturn a new array of only even numbers ',()=>{
66
constnumbers=[1,2,3,4,5,6,7,8,9,10];
77

88
// your code goes here
99

1010
expect(results).to.deep.equal([2,4,6,8,10]);
1111
});
1212

13-
it.skip('shouldpick the odd numbers ',()=>{
13+
it.skip('shouldreturn a new array of only odd numbers ',()=>{
1414
constnumbers=[1,2,3,4,5,6,7,8,9,10];
1515

1616
// your code goes here
1717

1818
expect(results).to.deep.equal([1,3,5,7,9]);
1919
});
2020

21-
it.skip('shouldpick words with three characters',()=>{
21+
it.skip('shouldreturn a new array of words with three characters',()=>{
2222
constwords=["pill","bad","finger","cat","blue","dog","table","red"];
2323

2424
// your code goes here
2525

2626
expect(results).to.deep.equal(["bad","cat","dog","red"]);
2727
});
2828

29-
it.skip('shouldpick arrays only',()=>{
29+
it.skip('shouldreturn a new array of arrays',()=>{
3030
constelements=["CAT",["dog"],23,[56,3,8],"AIMLESS",43,"butter"];
3131

3232
// your code goes here
3333

3434
expect(results).to.deep.equal([["dog"],[56,3,8]]);
3535
});
3636

37-
it.skip('should remove specific array from object',()=>{
38-
consthuman={name:'yung-jhun',songs:[['cool song 1',50],['cool song 2',100],['cool song 3',90]]};
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+
3944
constsaying='cool song 2';
4045

4146
//your code goes here
4247

43-
expect(human.songs).to.deep.equal([['cool song 1',50],['cool song 3',90]]);
48+
expect(human.songs).to.deep.equal([['cool song 1',50],
49+
['cool song 3',90]]);
4450
});
4551

46-
it.skip('should filter based off of strings from user ',()=>{
52+
it.skip('should filtermessagebased off of strings from user ',()=>{
4753
constuserString='su';
4854
constmessages=[{user:'louisa',message:'haaaaa'},
4955
{user:'yung-jhun',message:'kewl dude'},
5056
{user:'alter-nate',message:'suh kewl'},
5157
{user:'meeka',message:'adfasuhlkj'},
52-
{user:'robbie',message:'imsuperloud'}];
58+
{user:'robbie',message:'im loud'}];
5359

5460
// your code goes here
5561

5662

5763
expect(results).to.deep.equal([{user:'alter-nate',message:'suh kewl'},
5864
{user:'meeka',message:'adfasuhlkj'},
59-
{user:'robbie',message:'imsuperloud'}]);
65+
{user:'robbie',message:'im loud'}]);
6066
});
6167

62-
it.skip('should return the correct ids',()=>{
68+
it.skip('should returna new array withthe correct ids',()=>{
6369
constdata=[{account:'person 1',id:'00112'},
6470
{account:'person 2',id:'00045'},
6571
{account:'person 3',id:'12309'},

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp