-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathtest.js
72 lines (68 loc) · 1.55 KB
/
test.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
var test = require('tap').test;
var a = require('./');
var fixture = function Fixture () {};
fixture.prototype = Array.prototype;
fixture.web_220 = {
"id": "foo",
"name": "test.jpg",
"basename": "test",
"ext": "jpg",
"size": 20953,
"mime": "image/jpeg",
"type": "image",
"field": "media",
"md5hash": "xxxxx",
"original_id": "xxxxx",
"original_basename": "test",
"original_md5hash": "xxxxx",
"url": "http://test.jpg",
"meta": {
"width": 220,
"height": 160,
"date_recorded": null,
"date_file_created": null,
"date_file_modified": "2014/04/15 22:14:31 GMT",
"title": null,
"description": null,
"location": null,
"aspect_ratio": 1.375,
"city": null,
"state": null,
"country": null,
"country_code": null,
"keywords": null,
"aperture": null,
"exposure_compensation": null,
"exposure_mode": null,
"exposure_time": null,
"flash": null,
"focal_length": null,
"f_number": null,
"iso": null,
"light_value": null,
"metering_mode": null,
"shutter_speed": null,
"white_balance": null,
"device_name": null,
"device_vendor": null,
"device_software": null,
"latitude": null,
"longitude": null,
"orientation": null,
"has_clipping_path": false,
"creator": null,
"author": null,
"copyright": null,
"copyright_notice": null,
"frame_count": 1
},
"ssl_url": "https://test.jpg"
};
test('assembly assets', function (t) {
t.equal(
'foo',
a(fixture).web_220.id,
'mapped id'
);
t.end();
});