Skip to content

Commit f5abfce

Browse files
small refactor
1 parent a42257c commit f5abfce

1 file changed

Lines changed: 25 additions & 23 deletions

File tree

packages/storage/system-test/storage.js

Lines changed: 25 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -560,38 +560,40 @@ describe('storage', function() {
560560

561561
// Normalization form C: a single character for e-acute;
562562
// URL should end with Cafe%CC%81
563-
describe('normalization form C', function() {
564-
it('should not perform normalization', function(done) {
565-
var name = 'Caf\u00e9';
566-
var expectedContents = 'Normalization Form C';
567-
var file = bucket.file(name);
563+
it('should not perform normalization form C', function() {
564+
var name = 'Caf\u00e9';
565+
var file = bucket.file(name);
568566

569-
file.get().then(function(data) {
567+
var expectedContents = 'Normalization Form C';
568+
569+
return file.get()
570+
.then(function(data) {
570571
var receivedFile = data[0];
571-
assert.equal(receivedFile.name, name);
572+
assert.strictEqual(receivedFile.name, name);
572573
return receivedFile.download();
573-
}).then(function(contents) {
574-
assert.equal(contents.toString(), expectedContents);
575-
}).then(done);
576-
});
574+
})
575+
.then(function(contents) {
576+
assert.strictEqual(contents.toString(), expectedContents);
577+
});
577578
});
578579

579-
// Normalization Form D: an ASCII character followed by U+0301 combining
580+
// Normalization form D: an ASCII character followed by U+0301 combining
580581
// character; URL should end with Caf%C3%A9
581-
describe('normalization Form D', function() {
582-
it('should not perform normalization', function(done) {
583-
var name = 'Cafe\u0301';
584-
var expectedContents = 'Normalization Form D';
585-
var file = bucket.file(name);
582+
it('should not perform normalization form D', function() {
583+
var name = 'Cafe\u0301';
584+
var file = bucket.file(name);
586585

587-
file.get().then(function(data) {
586+
var expectedContents = 'Normalization Form D';
587+
588+
return file.get()
589+
.then(function(data) {
588590
var receivedFile = data[0];
589-
assert.equal(receivedFile.name, name);
591+
assert.strictEqual(receivedFile.name, name);
590592
return receivedFile.download();
591-
}).then(function(contents) {
592-
assert.equal(contents.toString(), expectedContents);
593-
}).then(done);
594-
});
593+
})
594+
.then(function(contents) {
595+
assert.strictEqual(contents.toString(), expectedContents);
596+
});
595597
});
596598
});
597599

0 commit comments

Comments
 (0)