We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5b96e62 commit 45a1331Copy full SHA for 45a1331
test/file.js
@@ -10,7 +10,7 @@ try {
10
describe('File', function() {
11
describe('Saving base64', function() {
12
var base64 = 'd29ya2luZyBhdCBhdm9zY2xvdWQgaXMgZ3JlYXQh';
13
- var fileName = 'base64.txt';
+ var fileName = '中文.txt';
14
15
it('should be saved', function() {
16
var file = new AV.File(fileName, { base64: base64 });
@@ -29,7 +29,9 @@ describe('File', function() {
29
file.metaData('format', 'txt file');
30
file.setACL(new AV.ACL());
31
return file.save({ keepFileName: true }).then(function() {
32
- expect(file.url()).to.match(new RegExp(fileName + '$'));
+ expect(file.url()).to.match(
33
+ new RegExp(encodeURIComponent(fileName) + '$')
34
+ );
35
expect(file.ownerId()).to.be.ok();
36
expect(file.id).to.be.ok();
37
expect(file.metaData('format')).to.be('txt file');
0 commit comments