Sign Up for Free

RunKit +

Try any Node.js package right in your browser

This is a playground to test code. It runs a full Node.js environment and already has all of npm’s 400,000 packages pre-installed, including meta-confirm with all npm packages installed. Try it out:

var metaConfirm = require("meta-confirm")

This service is provided by RunKit and is not affiliated with npm, Inc or the package authors.

meta-confirm v0.4.0

meta-confirm was intended to allow a simple way to test or confirm the existence of specific meta tag and description on a web page

meta-confirm

Build Status

View Build Queue in Travis CI

meta-confirm. Designed to do easy and quick testing of web pages for specific tags.

  • Can be run as part of an application to check sites on an ongoing basis for quality.
  • Can be used as part of test framework (mocha example provided) to ensure meta tag quality during development.

Depending on if you need as part of your testing framework or as part of an application, use the appropriate npm install:

npm install meta-confirm --save-dev

or

npm install meta-confirm --save

##Using the module (application)

For a sample from normal code, see example-simple.js

For a sample test running in mocha, see mochaSingleTests.js

nodeJS and express sample

var metaconfirm = require('meta-confirm');
var expect = require('chai').expect;
    
describe('Mike Test', function () {
    "use strict";

    var testPort = 9005;

    describe('findInPage', function () {

        it('should work', function (done) {

            var url = "http://localhost:" + testPort;

            var searchMetaType = "name";
            var searchTag = "description";
            var content = "Caspar Computer Services Inc.  Providing Innovative Solutions since 1984. Passionate about Agile Development";


            metaconfirm.FindInPage(url, searchMetaType, searchTag, content, function callback(err, result) {
                //if we have no result and no error, it's not completed!

                if (err) {
                    throw err;
                }

                if (result) {
                    expect(result).equals(true, "Expecting a True result from Meta Search");
                    done();
                }

            });
        });
    });
});

##Module History and Version Support

Each published version of meta-confirm is tested with currently-supported versions of Node. (LTS versions.)

Each published version of meta-confirm is tested with currently-supported versions of Node. (LTS versions.) Long-term Support schedules are published by the Node.js Foundation Release Working Group here.

meta-confirm may continue to work on older versions of Node.js indefinately; but we do not test nor recommend that you use older versions.

To see which versions of Node we test on, in both Windows and Linux environments, see our Travis-CI build record.

Metadata

RunKit is a free, in-browser JavaScript dev environment for prototyping Node.js code, with every npm package installed. Sign up to share your code.
Sign Up for Free