~ubuntu-branches/ubuntu/vivid/node-cssom/vivid

« back to all changes in this revision

Viewing changes to spec/MediaList.spec.js

  • Committer: Package Import Robot
  • Author(s): Laszlo Boszormenyi (GCS), Bart Martens
  • Date: 2013-02-25 15:07:22 UTC
  • mfrom: (1.1.3)
  • Revision ID: package-import@ubuntu.com-20130225150722-im8vud38z3qoqa0p
Tags: 0.2.5-1
* New upstream release.
* Update Standards-Version to 3.9.4 and debhelper level 9 .
* Add docs again, upstream reintroduced README.mdown .
* Add myself to uploaders.

[ Bart Martens <bartm@debian.org> ]
* Update watch file.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
describe('CSSOM', function() {
 
2
describe('MediaList', function() {
 
3
 
 
4
        it('appendMedium, deleteMedium, mediaText', function() {
 
5
                var m = new CSSOM.MediaList;
 
6
                expect(m.length).toBe(0);
 
7
 
 
8
                m.appendMedium("handheld");
 
9
                m.appendMedium("screen");
 
10
                m.appendMedium("only screen and (max-device-width: 480px)");
 
11
 
 
12
                m.deleteMedium("screen");
 
13
 
 
14
                expect(m[2]).toBeUndefined();
 
15
 
 
16
                var expected = {
 
17
                        0: "handheld",
 
18
                        1: "only screen and (max-device-width: 480px)",
 
19
                        length: 2
 
20
                };
 
21
 
 
22
                expect(m).toEqualOwnProperties(expected);
 
23
                expect(m.mediaText).toBe([].join.call(expected, ", "));
 
24
        });
 
25
 
 
26
});
 
27
});