{"size": 756, "ext": "js", "max_stars_repo_path": "MakiBlog/test/test.js", "max_stars_repo_name": "makiyamad/ProgressiveWebAppBlog", "max_stars_repo_stars_event_min_datetime": "2020-08-07T01:27:43.000Z", "max_stars_repo_stars_event_max_datetime": "2020-12-07T09:50:21.000Z", "max_issues_repo_path": "MakiBlog/test/test.js", "max_issues_repo_name": "makiyamad/ProgressiveWebAppBlog", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "MakiBlog/test/test.js", "max_forks_repo_name": "makiyamad/ProgressiveWebAppBlog", "max_forks_repo_forks_event_min_datetime": "2019-09-16T14:41:31.000Z", "max_forks_repo_forks_event_max_datetime": "2021-05-22T12:43:28.000Z"}
{"max_stars_count": 2, "max_issues_count": null, "max_forks_count": 9, "avg_line_length": 26.0689655172, "max_line_length": 102, "alphanum_fraction": 0.6256613757}
var assert = require('assert');
var systemJS = require('../wwwroot/lib/systemjs/system.js');

System.set(System.normalizeSync('lib/localforage/localforage.min.js'), System.newModule({
  createInstance() {
    return {
      getItem: function (link) {
        return new Promise(function (resolve) { resolve(link); });
      }
    };
  }
}));

describe('clientStorage', function () {
  it('should return text when getPostText is called', function (done) {

    var clientStorage = systemJS.import('wwwroot/js/clientStorage.js').then(function (clientStorage) {

      clientStorage.getPostText('hello').then(function (text) {
        assert.equal(text, '#hello');
      }).catch(function(err){
          done(err);
      });

      done();
    });
  });
});
