Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
menu search
person
Welcome To Ask or Share your Answers For Others

Categories

I have been trying to use QUnit to test my code but have been getting this error: "Library with identifier QUnit is missing (perhaps it was deleted, or maybe you don't have read access?)."

I am sure I have installed it correctly with the correct key.

My google account is a G Suite for Education Account that's been set up by my company, I have two different Education accounts with them. Both accounts are in different organisational units from each other. One of them can run QUnit with no issues but I need it to work on the account that is throwing the error.

I took the following steps too add QUnit to my project:

  1. Went onto Libraries and entered the code "MxL38OxqIK-B73jyDTvCe-OBao7QLBR4j"

  2. Selected version 4.

  3. Published as a Web App and then selected "Test web app for your latest code" to view the results.

  4. I am then presented with the error message on a new tab.

When I try these same steps on my Personal Google Account as well there seems to be no issues.

Below is my QUnit code, if you can see where I've went wrong or if there are any G Suite Settings that should be changed that you know of that would be a great help.

function doGet( e ) {
  QUnit.urlParams( e.parameter );
  
  QUnit.config({
    title: "Unit tests for my project" 
  });
  QUnit.load( tests );
  return QUnit.getHtml();
};


function tests() {
  addEqual();
  addNotEqual();
  multiplyEqual();
  multiplyNotEqual();
}


function addEqual() {
  test("Add number to number", function() {
    equal(addNumbers(), 5, 'It worked!');
  });
}

function addNotEqual() {
  test("Add number to number", function() {
    equal(addNumbers(), 8, 'It worked!');
  });
}

function multiplyEqual() {
  test("Multiply Number with a Number", function() {
    equal(multiply(), 6, 'It Worked!');
  });
}

function multiplyNotEqual() {
  test("Multiply Number with a Number", function() {
    notEqual(multiply(), 9, 'It Worked!');
  });
}
See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
646 views
Welcome To Ask or Share your Answers For Others

1 Answer

Summary:

So far, the easiest way to solve the issue is not to use the library feature at all, but directly copy paste files from the library's source. Note that all .gs and .html files should be included as separate files in your project. Other ways to solve includes various versions of deleting the calling script project and re-adding each library in a new project. On the library developer side, it includes saving a new version of the library.

Possible Cause(s):

Possible Solution(s):

Currently Open Issue Trackers:

Closed Trackers(for research):

Related:


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
...