Skip to content

Commit

Permalink
✏️ fix typos
Browse files Browse the repository at this point in the history
  • Loading branch information
techouse committed Apr 10, 2024
1 parent 4321b69 commit 7ad3357
Showing 1 changed file with 22 additions and 22 deletions.
44 changes: 22 additions & 22 deletions test/unit/encode_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -340,7 +340,7 @@ void main() {
);

test(
'encodes an list value',
'encodes a list value',
() {
expect(
QS.encode(
Expand Down Expand Up @@ -457,9 +457,9 @@ void main() {
},
);

group('encodes an list value with one item vs multiple items', () {
group('encodes a list value with one item vs multiple items', () {
test(
'non-array item',
'non-list item',
() {
expect(
QS.encode(
Expand Down Expand Up @@ -505,7 +505,7 @@ void main() {
);

test(
'array with a single item',
'list with a single item',
() {
expect(
QS.encode(
Expand Down Expand Up @@ -573,7 +573,7 @@ void main() {
);

test(
'array with multiple items',
'list with multiple items',
() {
expect(
QS.encode(
Expand Down Expand Up @@ -641,7 +641,7 @@ void main() {
);

test(
'array with multiple items with a comma inside',
'list with multiple items with a comma inside',
() {
expect(
QS.encode(
Expand Down Expand Up @@ -909,7 +909,7 @@ void main() {
);
});

test('encodes comma and empty non-array values', () {
test('encodes comma and empty non-list values', () {
expect(
QS.encode(
{'a': ',', 'b': '', 'c': 'c,d%'},
Expand Down Expand Up @@ -1107,7 +1107,7 @@ void main() {
},
);

test('encodes an map inside an list', () {
test('encodes an map inside a list', () {
expect(
QS.encode(
{
Expand Down Expand Up @@ -1248,7 +1248,7 @@ void main() {
});

test(
'encodes an list with mixed maps and primitives',
'encodes a list with mixed maps and primitives',
() {
expect(
QS.encode(
Expand Down Expand Up @@ -1304,7 +1304,7 @@ void main() {
);

test(
'encodes an map inside an list with dots notation',
'encodes an map inside a list with dots notation',
() {
expect(
QS.encode(
Expand Down Expand Up @@ -1582,7 +1582,7 @@ void main() {
);
});

test('arrayFormat default', () {
test('listFormat default', () {
expect(
QS.encode(
{
Expand Down Expand Up @@ -1977,7 +1977,7 @@ void main() {
});

test(
'selects properties when filter=array',
'selects properties when filter=list',
() {
expect(
QS.encode(
Expand Down Expand Up @@ -2557,7 +2557,7 @@ void main() {
'b': {'c': 'd', 'e': 'f'}
}
};
final Map<String, dynamic> withArray = {
final Map<String, dynamic> withList = {
'a': {
'b': [
{'c': 'd', 'e': 'f'}
Expand Down Expand Up @@ -2609,38 +2609,38 @@ void main() {

expect(
QS.encode(
withArray,
withList,
const EncodeOptions(encode: false),
),
equals('a[b][0][c]=d&a[b][0][e]=f'),
reason: 'array, no listFormat',
reason: 'list, no listFormat',
);

expect(
QS.encode(
withArray,
withList,
const EncodeOptions(encode: false, listFormat: ListFormat.brackets),
),
equals('a[b][][c]=d&a[b][][e]=f'),
reason: 'array, bracket',
reason: 'list, bracket',
);

expect(
QS.encode(
withArray,
withList,
const EncodeOptions(encode: false, listFormat: ListFormat.indices),
),
equals('a[b][0][c]=d&a[b][0][e]=f'),
reason: 'array, indices',
reason: 'list, indices',
);

expect(
QS.encode(
withArray,
withList,
const EncodeOptions(encode: false, listFormat: ListFormat.repeat),
),
equals('a[b][c]=d&a[b][e]=f'),
reason: 'array, repeat',
reason: 'list, repeat',
);
});

Expand Down Expand Up @@ -2946,7 +2946,7 @@ void main() {
);
}

test('edge case with map/arrays', () {
test('edge case with map/lists', () {
expect(
QS.encode(
{
Expand Down

0 comments on commit 7ad3357

Please sign in to comment.