Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import * as coreHttp from "@azure/core-http";
import * as Models from "./models";

const packageName = "app-configuration";
const packageVersion = "1.0.0";
export const packageVersion = "1.0.0-preview.4";

export class AppConfigurationContext extends coreHttp.ServiceClient {
syncToken?: string;
Expand Down
16 changes: 16 additions & 0 deletions sdk/appconfiguration/app-configuration/test/package.spec.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
import { join } from "path";
import { readFileSync } from "fs";
import * as assert from "assert";
// this constant isn't normally exported by the generator so you'll need to do it
// by hand if you regenerate the models.
import { packageVersion } from "../src/generated/src/appConfigurationContext";

describe("packagejson related tests", () => {
it("user agent string", () => {
const packageJsonFilePath = join(__dirname, "../package.json");
const rawFileContents = readFileSync(packageJsonFilePath, { encoding: "utf-8" });
const packageJsonContents = JSON.parse(rawFileContents);

assert.equal(packageJsonContents.version, packageVersion);
});
});