Pankaj Zanzane
Pankaj Zanzane

Reputation: 1242

Error while Adding expect library (https://github.com/mjackson/expect) in JSBin.com

While trying to add Expect library in Jsbin.com console, it return undefined.

var mylib = {
  text: 'My Category',
  scripts: [
    { text: 'My library', url: 'https://github.com/mjackson/expect/blob/master/modules/index.js' }
  ]
};
libraries.add(mylib);

Upvotes: 0

Views: 232

Answers (2)

Ali Baghban
Ali Baghban

Reputation: 695

You may use this stand alone module:

<script src="https://wzrd.in/standalone/[email protected]"></script>

put it in your head tag of the HTML file.

Upvotes: 0

simbathesailor
simbathesailor

Reputation: 3687

why don't you add script tag in the head. Try this in jsbin.com

<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width">
  <title>JS Bin</title>
  <script src="https://unpkg.com/expect@%3C21/umd/expect.min.js"></script>
</head>
<body>
  <script>
    console.log("expect", expect.createSpy)
  </script>
</body>
</html> 

Upvotes: 1

Related Questions