mirror of
https://github.com/Leaflet/Leaflet.git
synced 2026-02-01 17:27:23 +00:00
improved Class spec
This commit is contained in:
parent
db5809b473
commit
9d4e335fe0
@ -71,11 +71,21 @@ describe("Class", function() {
|
||||
expect(Klass2.bla).toEqual(1);
|
||||
});
|
||||
|
||||
it("should include the given mixins", function() {
|
||||
it("should include the given mixin", function() {
|
||||
var a = new Klass();
|
||||
expect(a.mixin).toBeTruthy();
|
||||
});
|
||||
|
||||
it("should be able to include multiple mixins", function() {
|
||||
var Klass2 = L.Class.extend({
|
||||
includes: [{mixin: true}, {mixin2: true}]
|
||||
});
|
||||
var a = new Klass2();
|
||||
|
||||
expect(a.mixin).toBeTruthy();
|
||||
expect(a.mixin2).toBeTruthy();
|
||||
});
|
||||
|
||||
it("should grant the ability to include the given mixin", function() {
|
||||
Klass.include({mixin2: true});
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user