'use strict';


import {initJSDOM} from "../../util/jsdom.mjs";
import {expect} from "chai"
let Resource,DerivedResource;



describe('Resource', function() {

    before(function (done) {
        initJSDOM().then(() => {

            import("../../../source/dom/resource.mjs").then((m) => {
                Resource = m['Resource'];


                DerivedResource = class  extends Resource {
                    constructor() {
                        super({
                            "data-url": "http://example.com",
                        });
                    }

                    static getURLAttribute() {
                        return 'data-url';
                    }
                }                
                
                done()
            });

        });


    })

    describe('DerivedResource', function () {

        it('should instanceof Resource', function () {
            expect(new DerivedResource()).to.be.an.instanceof(Resource);
        });

    });


});